[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> [091102 12:40]:
> >What did you change, and what did you change it to?
> 
> >I'm not sure I understand what you were able to get working and what
> >you weren't.  It looks like the admin mfs works, but I am not clear on
> >if you were able to actually load an image onto a node or not.  Can
> >you clarify that for me?
> 
> I thought it was just some typo in your "create_linux_mfs_descriptors"
> and those "grub.cfg" because your descriptor tells the database to
> record the path='/frisbee_linux', not '/tftpboot/Frisbee_linux', and so
> in the grub.cfg. I just modified them correspondingly because I put the
> 'frisbee_linux' under /tftpboot.

I guess it depends on how your tftpd is configured.  The configuration
I sent you works here, so I'm a bit surprised it doesn't work for you
as-is.  Regardless, I'm glad it's working now.

> Now, the only problem I may have is how to customize a general image,
> like Freebsd6.4 or Fedora8 under linux admin MFS. All the instructions
> for doing this were based on FreeBSD MFS. I am not sure if those still
> works under linux MFS. Would you please give some advice? Thanks a lot.

Yes.  There are a few changes you need to know about:

1. Make sure you know what FreeBSD will call your disk.  Even if
you're using the Linux MFS, the Emulab code right now requires the
FreeBSD name to be stored in the database.  When using the FreeBSD
MFS, this value is used as-is, but the Linux MFS must convert it to
something Linux understands.  Generally, it will probably be called
'sda' under Linux so if you're not sure what FreeBSD calls it you can
use 'da0' as a default.  Step 1 in "Customizing the Generic Image"
discusses how to make sure the correct value is specified in the
database.  When the directions tell you to set the DSK environment
variable, use the correct Linux name for it and not the FreeBSD one if
you're using the Linux MFS.

2. The FreeBSD MFS will automatically detect the BSD disklabel when
you've loaded a FreeBSD image.  Linux does not, so you will need to
tell the kernel to re-scan the partition table for that disk before
customizing FreeBSD.  Right now the easiest way to do this from the
MFS is to run this command after you've finished step 1: 'hdparm -z
${DSK}'.  If this doesn't work, use 'echo w | /sbin/fdisk ${DSK}'
instead.

3.  Linux names FreeBSD partitions differently than FreeBSD does.
Under our standard partition layout, the following describes the
mapping between the FreeBSD name and the Linux name (assuming that
FreeBSD thinks your disk is /dev/da0 and Linux thinks it's /dev/sda):

/dev/da0s1a -> /dev/sda5 (mounts on /mnt)
/dev/da0s1b -> /dev/sda6 (do not mount (swap partition))
/dev/da0s1e -> /dev/sda7 (mounts on /mnt/var)
/dev/da0s1f -> /dev/sda8 (mounts on /mnt/usr)

So in step 2 (Customize FreeBSD) when it tells you to mount the
FreeBSD partitions, use the mapping above to mount them.

Some of our newer FreeBSD images don't have a FreeBSD swap partition,
but share the Linux swap partition.  For those, the following map
would apply:

/dev/da0s1a -> /dev/sda5 (mounts on /mnt)
/dev/da0s1e -> /dev/sda6 (mounts on /mnt/var)
/dev/da0s1f -> /dev/sda7 (mounts on /mnt/usr)

I should probably automate this for at least the Linux MFS since its
device naming is somewhat less predictable than that of the FreeBSD
one.


Other than the above, the process should basically be the same.
I haven't run through the initial image customization yet using the
Linux MFS, although there's really no reason it shouldn't work.  Make
sure that the Linux MFS recognizes your disk first.  You can send me
the output of dmesg if it doesn't appear to be found (it'll probably
be recognized as /dev/sda).

Let me know if you have any further questions or problems.