load kernel from different media

Sergio de Almeida Lenzi lenzi.sergio at gmail.com
Wed Jul 1 23:08:15 UTC 2009

Em Qua, 2009-07-01 às 22:40 +0100, Chris Whitehouse escreveu:

Yes you can.
put your kernel (the one that works) on a DVD/CD
assume that your rootfs on the HD is on ad0s1a, /usr is on /dev/ad0s1e
with all the /boot directory.
than boot from dvd/CD
with the HD on the machine too.

on the startup, hit 6 (number 6).
than type:
set vfs.root.mountfrom="ufs:ad0s1a"
boot -s
the machine will boot from the CD (with the kernel on the CD)
than will mount the filesystem / (root) using ufs and the
device /dev/ad0s1a
once boot, you can mount the / rw..... 
mount -o rw /dev/ad0s1a /mnt
mount /dev/ad0s1e /usr

export PATH=/mnt/sbin:/mnt/bin:/usr/sbin:/usr/bin
mount -t cd9660 /dev/acd0 /cdrom
cd /cdrom
tar cf - boot | tar -xpvf - -C /mnt
edit /mnt/fstab to match the /(root) fs .....
/dev/ad0s1a                /            ufs            rw        1    1
the machine will reboot and boot happy on the hd....

hope it can help

More information about the freebsd-questions mailing list