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

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



Hello Ryan,

First, thanks very much for your kind instruction on those partition
structures. I really appreciate it.

Now, I can mount the BSD partition under "/etc/testbed/mount_bsd_slice
/dev/sda1 /mnt", and finished the customization procedure. However,
there is still one issue, that mounting only works when I imageunzip the
whole big image (the BSD+Fedora-full.ndz) into the disk. 

At first, I imageunzip the FBSD64-GENERIC.ndz and FEDORA8-STD.ndz
separately into hard disk. There is one message at the beginning:
boss# sudo ssh pc1 imageunzip -s 1 - /dev/$DSK  <
/usr/testbed/images/FBSD64-GENERIC.ndz
Ignoring unknown relocation type 1
<========================
Wrote 3216052224 bytes (1316509184 actual) in 47 seconds
2544 max bufs, 15728640 max memory
2540 buffers split

boss# sudo ssh pc1 imageunzip -s 2 - /dev/$DSK  <
/usr/testbed/images/FEDORA8-STD.ndz
Wrote 3216084480 bytes (1346203136 actual) in 46 seconds
727 max bufs, 4718592 max memory
722 buffers split

Then, I run the 'hdparm -z /dev/sda' on the host of PC1, but there is
only sda and sda4 info in /proc/partitions. And of course, I can't mount
sda1 by the mount_bsd_slice. Again, no matter how I re-copy the
FBSD64-GENERIC.ndz, it still does not work. Maybe copy those two images
separately damaged some partition table, I guess.

Fortunately, I had previous imageziped full generic (BSD+linux.ndz)
image, and I can mount them two under this linux admin MFS. 
So now, can you give me a kick out on how to edit the grub under linux
admin MFS to boot both FreeBSD and Linux partition on the disk? Or how
can I figure it out under the command line?

Best Regards,

Cheng Cui
. Frey Computing Services Center . Baton Rouge, LA 70803

-----Original Message-----
From: 'Ryan Jackson' [mailto:rdjackso@flux.utah.edu] 
Sent: Friday, November 13, 2009 11:11 AM
To: Cheng Cui
Cc: Testbed-admins@flux.utah.edu
Subject: 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.