Joshua Hudson
2006-Apr-07 15:34 UTC
[klibc] Weird early-boot sequence, can't find a way to adapt to ramfs
This is most exceedingly weird boot/shutdown sequence that I used once, and can't find a way to adapt to initramfs. Since you guys are trying to adapt all mechanisms that use initrd to using initramfs, this should interest you. initrd has (all binaries static): /bin: init halt mount poweroff pivot_root reboot sh umount /etc: fstab haltrc /dev: null zero tty tty0 tty1 console->tty0 hda1 loop0 ram0 /proc: /host: /root: /linuxrc contents of fstab: /proc /proc proc defaults 0 0 /dev/hda1 /host ntfs umask=077 0 0 /host/linux/root.img ext2 ro 0 0 contents of /linuxrc: #!/bin/sh # This part normal mount /host mount /root cd /root pivot_root /root /root/initrd # This part unusual exec /initrd/bin/init end of systems /etc/rc.d/rc.0 (rc.6 -> rc.0): halt -w umount -a # Because /initrd is not in host's /etc/mtab, it's still there cd /initrd pivot_root /initrd /initrd/root exec /bin/sh /etc/haltrc $RUNLEVEL < dev/console > dev/console 2>&1 contents of /etc/haltrc: umount -a case $RUNLEVEL in 0) poweroff -f ;; 6) reboot -f ;; esac
H. Peter Anvin
2006-Apr-07 18:00 UTC
[klibc] Weird early-boot sequence, can't find a way to adapt to ramfs
Joshua Hudson wrote:> This is most exceedingly weird boot/shutdown sequence that I used > once, and can't find > a way to adapt to initramfs. Since you guys are trying to adapt all > mechanisms that use > initrd to using initramfs, this should interest you. >What are you trying to accomplish with it? -hpa