load kernel from different media

View: New views
3 Messages — Rating Filter:   Alert me  

load kernel from different media

by Chris Whitehouse-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I cannot boot my motherboard with the default kernel on 7.2-RELEASE (or
any other iso's I have tried). It panics if device sbp is in the kernel.
So far I've got things working by putting the hard disk in another
machine, installed the OS and rebuilt a kernel without sbp, then
returned the disk to my computer. That's ok for a one off install but
this machine is supposed to be for messing around.

Can I load a kernel from some other media? Eg boot from an install CD,
interrupt the boot, load a modified kernel from a usb stick or installed
hard drive and continue booting from the CD.

At the boot prompt I can list disks with lsdev and I can load and unload
a kernel from the media I booted from (obviously) but I can't see how to
load a kernel from another disk.

I checked man 8 loader and man 8 boot but couldn't see what I wanted,
hopefully I didn't just miss it. If the answer is in there I would
really appreciate a pointer.

Thanks

Chris
_______________________________________________
freebsd-questions@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."

Re: load kernel from different media

by Sergio de Almeida Lenzi-5 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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

than.....
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 .....
==============fstab=========
/dev/ad0s1a                /            ufs            rw        1    1
=====================
fastboot
the machine will reboot and boot happy on the hd....

hope it can help
_______________________________________________
freebsd-questions@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."

Re: load kernel from different media

by Chris Whitehouse-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Sergio de Almeida Lenzi wrote:

> 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
>
> than.....
> 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 .....
> ==============fstab=========
> /dev/ad0s1a                /            ufs            rw        1    1
> =====================
> fastboot
> the machine will reboot and boot happy on the hd....
>
> hope it can help
> _______________________________________________
> freebsd-questions@... mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."
>
Hi sergio

thanks for your reply. I've been playing around with bootable pen drives
cd's and hard disks with varying degrees of breakage :) however now i"ve
found the workaround for the original problem which is simply to disable
firewire in the BIOS.

cheers

Chris
_______________________________________________
freebsd-questions@... mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "freebsd-questions-unsubscribe@..."