boot from second disk (gmirror device) ... problems

Fernan Aguero fernan.aguero at gmail.com
Mon Jul 30 13:46:01 UTC 2007


On 7/28/07, Fluffles <etc at fluffles.net> wrote:
> Fernan Aguero wrote:
> > After setting up /etc/fstab and /boot/loader.conf in my
> > /dev/mirror/gm0a partition
> > rebooting brings me to the boot loader prompt because:
> > 1:ad(2,a)/boot/loader
> > is not a valid label or /boot/loader does not exist
> >
>
> On a boot partition you need to have a slice, so you probably should use:
>
> 1:ad(2,1,a)/boot/loader
>
> this will try to boot from ad2s1a, a likely name for a boot partition on the secondary master PATA disk.

I can confirm now that this doesn't work.

I do have a slice on the second disk (there is only one slice, ad2s1),
and fdisk tells me that this slice is marked as 'active'. Also, there are
8 partitions (a, b, d, e, f, g, h) with partition 'a' containing an
exact copy of the partition 'a' in ad0s2a.

rho# fdisk ad2
******* Working on device /dev/ad2 *******
parameters extracted from in-core disklabel are:
cylinders=57461 heads=16 sectors/track=255 (4080 blks/cyl)

Figures below won't work with BIOS for partitions not in cyl 1
parameters to be used for BIOS calculations are:
cylinders=57461 heads=16 sectors/track=255 (4080 blks/cyl)

Media sector size is 512
Warning: BIOS sector numbering starts with sector 1
Information from DOS bootblock is:
The data for partition 1 is:
sysid 165 (0xa5),(FreeBSD/NetBSD/386BSD)
    start 255, size 234432465 (114468 Meg), flag 80 (active)
        beg: cyl 0/ head 1/ sector 1;
        end: cyl 114/ head 15/ sector 63


> You may also press "?" at the prompt and get a list of devices.

I don't get a list of devices. When /boot.config contains something
that doesn't work (1:ad(2,a); 1:ad(2,1,a); 1:ad(1,a) ...) then
pressing '?' does nothing (i.e. prints an 'Incorrect label' or some
similar error message)

However, when I type something that at least works partiallty (i.e.
points at the right disk (which is always the first disk in my case)
then pressing '?' gives me a list of directories under / (but not
a list of devices). In this case I can type 'boot/loader'
at the
boot:
prompt and boot fine (but from the first disk).

I have put all combinations you can imagine into /boot.config
to try to boot from the second disk. No luck whatsoever.

BTW, this is on FreeBSD-6.2 (RELEASE), on a MSI KM4MV motherboard.
http://www.msicomputer.com/product/p_spec.asp?model=KM4M-V


> Also, for your /etc/fstab you may wish to use a label instead. Read up on man glabel on how to set these up. The idea is that, by giving a disk a unique label, you can setup your /etc/fstab without worrying on what controller/cable/connector te disk is on. So doesn't matter if its ad2 or ad8, it will show up as /dev/label/mydisk and you can setup your /etc/fstab accordingly.

Thanks for the tip.

Would these labels work for the boot loader? E.g. can I label my
second disk (ad2) or the geom mirror device (gm0) and use that in
boot.config?

Thanks,

Fernan


> Good luck!
>
> - Veronica
>
>


-- 
--
fernan


More information about the freebsd-geom mailing list