[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Testbed-admins] Booting error in Customizing the Generic Image



* Cheng Cui <ccui1@tigers.lsu.edu> [091112 17:36]:
> On trying the mount, I get this error:
> # /etc/testbed/mount_bsd_slice /dev/sda5 /mnt
> Unable to get offset/size info for /dev/sda5

Actually /dev/sda5 is not the correct partition to pass to
mount_bsd_slice; /dev/sda1 is.  Here's why:

In our current partition scheme, DOS partition 1 contains a FreeBSD
disklabel which describes the FreeBSD partitions, all of which are
contained within DOS partition 1.  DOS partition 2 contains the Linux
root filesystem, and DOS partition 3 contains the Linux swap.  When
Linux encounters a FreeBSD disklabel, it maps any partitions in it to
unused partition numbers >= 5.  So if you're using our standard images
Linux will see the following partitions:

/dev/sda1: FreeBSD disklabel partition
/dev/sda2: Linux root partition
/dev/sda3: Linux swap partition
/dev/sda5: FreeBSD root partition
/dev/sda6: FreeBSD swap partition
/dev/sda7: FreeBSD /var partition
/dev/sda8: FreeBSD /usr partition

Partitions 5-8 exist inside of partition 1.  The idea of the script is
to mount all the filesystems contained in the FreeBSD disklabel
partition in right order, regardless of how many there are or what
Linux calls them.  For example, while the FreeBSD root is /dev/sda5
in this partition layout, that may not be true with other partition
layouts in the future.

Anyway, remember: you want to pass the DOS partition *containing* the
FreeBSD partitions, not the FreeBSD root partition itself.  Does that
make sense?

As for your error message, 'No such device or address' probably means
the kernel doesn't know of a partition 5 on /dev/sda, yet the device
file for it still exists.  To see if this is the case, run 'cat
/proc/partitions' and see if sda5 is present.  If not, then one of two
things has gone wrong:

1. You forgot to run 'hdparm -z /dev/sda' to re-read the partition
   table.
2. You did run hdparm, but Linux doesn't recognize the BSD disklabel
   stored at the beginning of /dev/sda1.  If this is the case, you'll
   need to write the image to disk again and re-run hdparm.


If you try the above and it still doesn't work, send me the output of
dmesg and tell me exactly what you did.