Browse Source

Stefan Fiedler:


			
			
				rocklinux
			
			
		
Stefan Fiedler 19 years ago
parent
commit
3e77791755
15 changed files with 47 additions and 48 deletions
  1. +5
    -6
      package/base/sysfiles/etc_fstab.txt
  2. +4
    -4
      package/base/sysfiles/etc_initscript.txt
  3. +1
    -1
      package/base/sysfiles/hwscan.awk
  4. +3
    -3
      package/base/sysfiles/stone_mod_install.sh
  5. +5
    -5
      package/base/sysfiles/stone_mod_setup.sh
  6. +4
    -4
      package/blindcoder/rockinitrd/linuxrc
  7. +1
    -1
      package/fake/pseudonative-daemon/pseudonative_daemon.c
  8. +2
    -2
      package/teha/rescue-stage1-init/init.c
  9. +3
    -3
      scripts/Build-Pkg
  10. +6
    -6
      scripts/Create-UMLRootfs
  11. +5
    -5
      target/livecd/linuxrc.c
  12. +3
    -3
      target/lvp/x86/livesystem/linuxrc
  13. +1
    -1
      target/rescue/build_stage2.sh
  14. +1
    -1
      target/rescue/contrib/init-boot-cycle
  15. +3
    -3
      target/router/init.sh

+ 5
- 6
package/base/sysfiles/etc_fstab.txt

@ -1,7 +1,6 @@
/dev/root / auto defaults 0 1 /dev/root / auto defaults 0 1
none /proc proc defaults 0 0
#none /dev devfs defaults 0 0
none /dev/pts devpts defaults 0 0
none /dev/shm ramfs defaults 0 0
none /sys sysfs defaults 0 0
#none /tmp tmpfs defaults 0 0
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults 0 0
ramfs /dev/shm ramfs defaults 0 0
sysfs /sys sysfs defaults 0 0
#tmpfs /tmp tmpfs defaults 0 0

+ 4
- 4
package/base/sysfiles/etc_initscript.txt

@ -38,7 +38,7 @@ fi
case "$devtype" in case "$devtype" in
devfs) devfs)
if ! [ -e /dev/.devfsd ] ; then if ! [ -e /dev/.devfsd ] ; then
mount -v -n -t devfs none /dev
mount -v -n -t devfs devfs /dev
exec > /dev/console 2>&1 < /dev/console exec > /dev/console 2>&1 < /dev/console
echo "Mounted /dev (devfs) from /etc/initscript." echo "Mounted /dev (devfs) from /etc/initscript."
fi fi
@ -48,11 +48,11 @@ case "$devtype" in
if ! [ -e /dev/.udevdb ] ; then if ! [ -e /dev/.udevdb ] ; then
if [ -e /dev/.devfsd ]; then if [ -e /dev/.devfsd ]; then
mount --move /dev /etc/udev mount --move /dev /etc/udev
mount -t ramfs none /dev
mount -t ramfs ramfs /dev
mkdir /dev/devfs mkdir /dev/devfs
mount --move /etc/udev /dev/devfs mount --move /etc/udev /dev/devfs
else else
mount -t ramfs none /dev
mount -t ramfs ramfs /dev
fi fi
mount -n /sys; mount -n /proc mount -n /sys; mount -n /proc
mkdir -p /dev/pts /dev/shm mkdir -p /dev/pts /dev/shm
@ -69,7 +69,7 @@ case "$devtype" in
;; ;;
*) *)
if ! [ -e /dev/console ]; then if ! [ -e /dev/console ]; then
mount -t ramfs none /dev
mount -t ramfs ramfs /dev
mknod -m 600 /dev/console c 5 1 mknod -m 600 /dev/console c 5 1
fi fi
exec > /dev/console 2>&1 < /dev/console exec > /dev/console 2>&1 < /dev/console

+ 1
- 1
package/base/sysfiles/hwscan.awk

@ -161,7 +161,7 @@ function get_usb_drivers() {
id = "usb-controller (PCI " usb_ctrl_driver ")"; id = "usb-controller (PCI " usb_ctrl_driver ")";
driver_mod[id] = usb_ctrl_driver; driver_mod[id] = usb_ctrl_driver;
driver_dsc[id] = usb_ctrl_desc; driver_dsc[id] = usb_ctrl_desc;
driver_cmd[id] = "\nmount -t usbfs none /proc/bus/usb";
driver_cmd[id] = "\nmount -t usbfs usbfs /proc/bus/usb";
drivers[id] = id; drivers[id] = id;
autocomplete(usb_ctrl_driver, id); autocomplete(usb_ctrl_driver, id);
} }

+ 3
- 3
package/base/sysfiles/stone_mod_install.sh

@ -210,9 +210,9 @@ This dialog allows you to modify your discs parition layout and to create filesy
$STONE packages $STONE packages
cat > /mnt/target/tmp/stone_postinst.sh << EOT cat > /mnt/target/tmp/stone_postinst.sh << EOT
#!/bin/sh #!/bin/sh
mount -v -t ramfs none /dev
mount -v -t proc none /proc
mount -v -t sysfs none /sys
mount -v -t ramfs ramfs /dev
mount -v -t proc proc /proc
mount -v -t sysfs sysfs /sys
/sbin/udevstart /sbin/udevstart
. /etc/profile . /etc/profile
stone setup stone setup

+ 5
- 5
package/base/sysfiles/stone_mod_setup.sh

@ -27,11 +27,11 @@ make_fstab() {
cat <<- EOT > $tmp2 cat <<- EOT > $tmp2
/dev/root / auto defaults 0 1 /dev/root / auto defaults 0 1
none /proc proc defaults 0 0
none /dev/pts devpts defaults 0 0
none /dev/shm ramfs defaults 0 0
none /sys sysfs defaults 0 0
#none /tmp tmpfs defaults 0 0
proc /proc proc defaults 0 0
devpts /dev/pts devpts defaults 0 0
ramfs /dev/shm ramfs defaults 0 0
sysfs /sys sysfs defaults 0 0
#tmpfs /tmp tmpfs defaults 0 0
EOT EOT
for x in /dev/cdroms/cdrom[0-9] ; do for x in /dev/cdroms/cdrom[0-9] ; do

+ 4
- 4
package/blindcoder/rockinitrd/linuxrc

@ -33,10 +33,10 @@ PATH="/sbin:/usr/sbin:/bin/:/usr/bin"
rootfs="" rootfs=""
rootfsmounted=0 rootfsmounted=0
mount -n -t tmpfs none /tmp
mount -n -t proc none /proc
mount -n -t sysfs none /sys
mount -n -t ramfs none /dev
mount -n -t tmpfs tmpfs /tmp
mount -n -t proc proc /proc
mount -n -t sysfs sysfs /sys
mount -n -t ramfs ramfs /dev
/sbin/udevstart /sbin/udevstart
/sbin/udevd --daemon /sbin/udevd --daemon
cd /dev cd /dev

+ 1
- 1
package/fake/pseudonative-daemon/pseudonative_daemon.c

@ -135,7 +135,7 @@ void do_chroot(char *d, char *b)
system(buf); system(buf);
snprintf(buf, 1024, "mount -t nfs -o noac %s/download %s/ROCK/download", d, e); snprintf(buf, 1024, "mount -t nfs -o noac %s/download %s/ROCK/download", d, e);
system(buf); system(buf);
snprintf(buf, 1024, "mount -t proc none %s/proc", e);
snprintf(buf, 1024, "mount -t proc proc %s/proc", e);
system(buf); system(buf);
} }

+ 2
- 2
package/teha/rescue-stage1-init/init.c

@ -255,7 +255,7 @@ int main(int argc, char **argv) {
} }
} }
if (mount("none", "/dev", "devfs", 0, NULL)) {
if (mount("devfs", "/dev", "devfs", 0, NULL)) {
if (errno != EBUSY) { /* might be mounted automatically at boot */ if (errno != EBUSY) { /* might be mounted automatically at boot */
perror("Can't mount /dev"); perror("Can't mount /dev");
die(); die();
@ -268,7 +268,7 @@ int main(int argc, char **argv) {
bootdev, bootfst); bootdev, bootfst);
shell(); shell();
} }
if (mount("none", "/mnt_root", "tmpfs", 0, TMPFS_OPTIONS)) {
if (mount("tmpfs", "/mnt_root", "tmpfs", 0, TMPFS_OPTIONS)) {
perror("Can't mount root-tmpfs. I need it at /mnt_root - good luck."); perror("Can't mount root-tmpfs. I need it at /mnt_root - good luck.");
shell(); shell();
} }

+ 3
- 3
scripts/Build-Pkg

@ -217,7 +217,7 @@ if [ "$chroot" = 1 ] ; then
if [ ! -f /proc/sys/fs/binfmt_misc/register ] ; then if [ ! -f /proc/sys/fs/binfmt_misc/register ] ; then
echo_status "Mounting /proc/sys/fs/binfmt_misc." echo_status "Mounting /proc/sys/fs/binfmt_misc."
mount -t binfmt_misc none /proc/sys/fs/binfmt_misc
mount -t binfmt_misc binfmt_misc /proc/sys/fs/binfmt_misc
fi fi
echo_status "Registering pseudonative_handler." echo_status "Registering pseudonative_handler."
@ -275,7 +275,7 @@ if [ "$chroot" = 1 ] ; then
fi fi
if [ ! -f proc/mounts ]; then if [ ! -f proc/mounts ]; then
mount -t proc none $PWD/proc
mount -t proc proc $PWD/proc
fi fi
for x in Documentation architecture misc package scripts target; do for x in Documentation architecture misc package scripts target; do
@ -687,7 +687,7 @@ echo_status "Preparing build in src.$xpkg.$id"
mkdir -p $builddir; chmod 700 $builddir mkdir -p $builddir; chmod 700 $builddir
if [ $clear_src = 1 ] ; then if [ $clear_src = 1 ] ; then
if [ "$ROCKCFG_SRC_TMPFS" = 1 ]; then if [ "$ROCKCFG_SRC_TMPFS" = 1 ]; then
mount -t tmpfs -o $ROCKCFG_SRC_TMPFS_OPT none $builddir
mount -t tmpfs -o $ROCKCFG_SRC_TMPFS_OPT tmpfs $builddir
fi fi
fi fi

+ 6
- 6
scripts/Create-UMLRootfs

@ -151,12 +151,12 @@ chroot $mountpoint bash /etc/cron.d/00-updates
sed -i -e 's,vc/1,vc/0,' -e 's,^\([2-6]:\),#\1,' $mountpoint/etc/inittab sed -i -e 's,vc/1,vc/0,' -e 's,^\([2-6]:\),#\1,' $mountpoint/etc/inittab
cat >$mountpoint/etc/fstab <<EOF cat >$mountpoint/etc/fstab <<EOF
/dev/root / auto defaults 0 1 /dev/root / auto defaults 0 1
none /proc proc defaults 0 0
none /dev devfs defaults 0 0
none /dev/pts devpts defaults 0 0
none /dev/shm ramfs defaults 0 0
none /sys sysfs defaults 0 0
#none /tmp tmpfs defaults 0 0
proc /proc proc defaults 0 0
devfs /dev devfs defaults 0 0
devpts /dev/pts devpts defaults 0 0
ramfs /dev/shm ramfs defaults 0 0
sysfs /sys sysfs defaults 0 0
#tmpfs /tmp tmpfs defaults 0 0
EOF EOF
# Copy the executable kernel # Copy the executable kernel

+ 5
- 5
target/livecd/linuxrc.c

@ -453,19 +453,19 @@ int main(int argc, char** argv)
} }
} }
if ( mount("none", "/dev", "devfs", 0, NULL) && errno != EBUSY )
if ( mount("devfs", "/dev", "devfs", 0, NULL) && errno != EBUSY )
perror("Can't mount /dev"); perror("Can't mount /dev");
if ( mount("none", "/sys", "sysfs", 0, NULL) && errno != EBUSY )
if ( mount("sysfs", "/sys", "sysfs", 0, NULL) && errno != EBUSY )
perror("Can't mount /sys (not fatal)"); perror("Can't mount /sys (not fatal)");
if ( mount("none", "/proc", "proc", 0, NULL) && errno != EBUSY )
if ( mount("proc", "/proc", "proc", 0, NULL) && errno != EBUSY )
perror("Can't mount /proc"); perror("Can't mount /proc");
if ( mount("none", "/dev/pts", "devpts", 0, NULL) && errno != EBUSY )
if ( mount("devpts", "/dev/pts", "devpts", 0, NULL) && errno != EBUSY )
perror("Can't mount /dev/pts (not too fatal)"); perror("Can't mount /dev/pts (not too fatal)");
if ( mount("none", "/dev/shm", "ramfs", 0, NULL) && errno != EBUSY )
if ( mount("ramfs", "/dev/shm", "ramfs", 0, NULL) && errno != EBUSY )
perror("Can't mount /dev/shm (not fatal)"); perror("Can't mount /dev/shm (not fatal)");
/* Only print important stuff to console */ /* Only print important stuff to console */

+ 3
- 3
target/lvp/x86/livesystem/linuxrc

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
mount -t proc none /proc
mount -t tmpfs none /tmp
mount -t devpts none /dev/pts
mount -t proc proc /proc
mount -t tmpfs tmpfs /tmp
mount -t devpts devpts /dev/pts
cd /dev ; rm -f fd cd /dev ; rm -f fd
ln -sf /proc/kcore core ln -sf /proc/kcore core

+ 1
- 1
target/rescue/build_stage2.sh

@ -142,7 +142,7 @@ do
done done
EOF EOF
<<EOF cat > etc/boot.d/05-system <<EOF cat > etc/boot.d/05-system
[ -f /proc/mounts ] || mount -t proc none /proc
[ -f /proc/mounts ] || mount -t proc proc /proc
[ -d /mnt/boot ] || mkdir -p /mnt/boot [ -d /mnt/boot ] || mkdir -p /mnt/boot
[ -d /dev/pts ] && mount /dev/pts [ -d /dev/pts ] && mount /dev/pts
rm -f /dev/fd ; ln -s /proc/self/fd /dev/fd rm -f /dev/fd ; ln -s /proc/self/fd /dev/fd

+ 1
- 1
target/rescue/contrib/init-boot-cycle

@ -55,7 +55,7 @@ fail_shell() {
# some init # some init
export PATH=/sbin:/bin:/usr/sbin:/usr/bin export PATH=/sbin:/bin:/usr/sbin:/usr/bin
mount -t proc none /proc
mount -t proc proc /proc
mkdir /mnt/boot /mnt/root mkdir /mnt/boot /mnt/root
mount --move /old_root/mnt_boot /mnt/boot mount --move /old_root/mnt_boot /mnt/boot
umount -n /old_root umount -n /old_root

+ 3
- 3
target/router/init.sh

@ -1,8 +1,8 @@
#!/bin/bash #!/bin/bash
mount -n -t proc none /proc
mount -n -t tmpfs none /tmp
mount -n -t devpts none /dev/pts
mount -n -t proc proc /proc
mount -n -t tmpfs tmpfs /tmp
mount -n -t devpts devpts /dev/pts
cat /proc/mounts > /etc/fstab cat /proc/mounts > /etc/fstab
cat /proc/mounts > /etc/mtab cat /proc/mounts > /etc/mtab

Loading…
Cancel
Save