From 5cebc366d2329c144dc5a545804858ff41700faa Mon Sep 17 00:00:00 2001 From: fake Date: Mon, 13 Dec 2004 16:52:46 +0000 Subject: [PATCH] fake: bootdisk: move sysfs mounting to the right location this is different to the livecd ... pivot_root is confusing ;) [2004121005145322855] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@5191 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- target/bootdisk/build_stage2.sh | 2 +- target/bootdisk/linuxrc.c | 3 --- target/bootdisk/linuxrc2.sh | 1 + 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/target/bootdisk/build_stage2.sh b/target/bootdisk/build_stage2.sh index f622d31b1..802075c02 100644 --- a/target/bootdisk/build_stage2.sh +++ b/target/bootdisk/build_stage2.sh @@ -111,7 +111,7 @@ tar -czf ../2nd_stage.tar.gz * ; cd .. echo_header "Creating small 2nd stage filesystem:" mkdir -p 2nd_stage_small ; cd 2nd_stage_small -mkdir -p dev proc tmp bin lib etc share +mkdir -p dev proc sys tmp bin lib etc share mkdir -p mnt/source mnt/target ln -s bin sbin ; ln -s . usr diff --git a/target/bootdisk/linuxrc.c b/target/bootdisk/linuxrc.c index 70801dd77..698f8ed79 100644 --- a/target/bootdisk/linuxrc.c +++ b/target/bootdisk/linuxrc.c @@ -611,9 +611,6 @@ int main() if ( mount("none", "/dev", "devfs", 0, NULL) && errno != EBUSY ) perror("Can't mount /dev"); - if ( mount("none", "/sys", "sysfs", 0, NULL) && errno != EBUSY ) - perror("Can't mount /sys (not fatal)"); - if ( mount("none", "/proc", "proc", 0, NULL) && errno != EBUSY ) perror("Can't mount /proc"); diff --git a/target/bootdisk/linuxrc2.sh b/target/bootdisk/linuxrc2.sh index e8502e418..5d53ee1c8 100644 --- a/target/bootdisk/linuxrc2.sh +++ b/target/bootdisk/linuxrc2.sh @@ -10,6 +10,7 @@ else done fi grep -v "^rootfs " /proc/mounts > /etc/mtab +mount -t sysfs none /sys freeramdisk /dev/rd/* 2> /dev/null mkdir -p /lib/modules/$( uname -r )