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

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



Hello Ryan,

>Could you do this again before going any further with installation 
>and send me the following output (start with the whole-disk image on
>disk so that you have a valid partition table):
>1. The output of '/sbin/fdisk -l -u /dev/sda' before you write either
>   image (FreeBSD or Linux) to disk.
>2. The content of /proc/partitions
>3. The exact commands you used to write the images
>4. The output of '/sbin/fdisk -l -u /dev/sda' after you write the
>   images.
>
>I'd really appreciate it so that I see if I need to fix anything on my
>end.  We need to make sure this will be stable for you.

It looks I got the reason. The whole-disk image (BSD+linux.ndz) must be
copied into disk first, then, any separate images can be copied into the
disk and they work. I tested it by reformat my hard disk, then, a
separate image copy does not work, but once the whole disk image copy is
committed, the following separated copy could work. Please refer to my
attached file on detail.

>Basically, once you've customized your images, proceed with
>installation as normal.  Nothing at this point is different from
>running a testbed using the FreeBSD MFS.
>
>Does this make sense, or have I misunderstood what you want to do?

What I want to do is that test if the customized image works. I am just
following the "Customizing the Generic Image==>step 5 - Testing the
Image". In that session, it is required to use a BSD MFS to load a
locally customized image by the magic: "type part:1".

In the one month ago question, my BSD MFS can't recognize my local image
by the "part:1", but if I directly boot the PC from disk, it works. So
that's why Mike want me to test a linux admin MFS now. And I really want
to know if the customized image under Linux admin MFS can be booted
successfully. Am I right?

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 5:11 PM
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> [091113 15:08]:
> 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.

Strange, that should work.  It works fine when using the Linux Frisbee
MFS to write separate images to each partition, so I don't know what's
wrong.

Could you do this again before going any further with installation 
and send me the following output (start with the whole-disk image on
disk so that you have a valid partition table):
1. The output of '/sbin/fdisk -l -u /dev/sda' before you write either
   image (FreeBSD or Linux) to disk.
2. The content of /proc/partitions
3. The exact commands you used to write the images
4. The output of '/sbin/fdisk -l -u /dev/sda' after you write the
   images.

I'd really appreciate it so that I see if I need to fix anything on my
end.  We need to make sure this will be stable for you.

> 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?

You don't need to edit the Grub configuration to do this; in fact you
shouldn't need to touch anything else at this point.

The nodes contact boss at boot time (actually Grub does using a custom
UDP protocol) to determine which partition to boot from, and
everything needed to do that has already been installed and is
working.  If it weren't you wouldn't be able to boot the admin MFS.

Right now boss is telling Grub (the one that's loaded via TFTP at boot
time, not the one installed in the Fedora boot sector) to load the
admin MFS over the network, so that's what it's doing.  Run this on
boss to make boss stop booting the admin MFS on this node (replace
'my_node' with the name of your node):

withadminprivs node_admin off my_node

Once that's done, reboot the node.  Grub will not boot the admin MFS
anymore, and will instead do one of the following:

1. Wait in Grub until boss tells it to boot something
2. Boot the Frisbee linux MFS and write an image to disk
3. Boot into the OS specified for that node

Basically, once you've customized your images, proceed with
installation as normal.  Nothing at this point is different from
running a testbed using the FreeBSD MFS.

Does this make sense, or have I misunderstood what you want to do?

Let me know if you still have problems after doing this.
boss# set DSK=sda
boss# sudo ssh pc1 imageunzip - /dev/$DSK  < /usr/testbed/images/FBSD64+FC8-STD.ndz
Wrote 20020396032 bytes (2662879744 actual) in 93 seconds
3364 max bufs, 40632320 max memory
3268 buffers split

boss# ssh pc1
# /sbin/fdisk -l -u /dev/sda  
 
Disk /dev/sda: 586.7 GB, 586772643840 bytes
255 heads, 63 sectors/track, 71337 cylinders, total 1146040320 sectors
Units = sectors of 1 * 512 = 512 bytes
 
   Device Boot      Start         End      Blocks  Id System
/dev/sda1   *          63     6281414     3140676  a5 FreeBSD
/dev/sda2         6281415    12562829     3140707+ 83 Linux
/dev/sda3        12562830    12819869      128520  82 Linux swap
/dev/sda4        12819870    39102335    13141233   0 Empty

# cat /proc/partitions  
major minor  #blocks  name
 
   8     0  573020160 sda
   8     1    3140676 sda1
   8     2    3140707 sda2
   8     3     128520 sda3
   8     4   13141233 sda4
   8     5     131072 sda5
   8     6     524288 sda6
   8     7     262144 sda7
   8     8    2223172 sda8

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
2561 max bufs, 28573696 max memory
2540 buffers split

# /sbin/fdisk -l -u /dev/sda
 
Disk /dev/sda: 586.7 GB, 586772643840 bytes
255 heads, 63 sectors/track, 71337 cylinders, total 1146040320 sectors
Units = sectors of 1 * 512 = 512 bytes
 
   Device Boot      Start         End      Blocks  Id System
/dev/sda1   *          63     6281414     3140676  a5 FreeBSD
/dev/sda2         6281415    12562829     3140707+ 83 Linux
/dev/sda3        12562830    12819869      128520  82 Linux swap
/dev/sda4        12819870    39102335    13141233   0 Empty

# hdparm -z /dev/sda
 
/dev/sda:
 re-reading partition table

# /sbin/fdisk -l -u /dev/sda
 
Disk /dev/sda: 586.7 GB, 586772643840 bytes
255 heads, 63 sectors/track, 71337 cylinders, total 1146040320 sectors
Units = sectors of 1 * 512 = 512 bytes
 
   Device Boot      Start         End      Blocks  Id System
/dev/sda1   *          63     6281414     3140676  a5 FreeBSD
/dev/sda2         6281415    12562829     3140707+ 83 Linux
/dev/sda3        12562830    12819869      128520  82 Linux swap
/dev/sda4        12819870    39102335    13141233   0 Empty

# cat /proc/partitions 
major minor  #blocks  name
 
   8     0  573020160 sda
   8     1    3140676 sda1
   8     2    3140707 sda2
   8     3     128520 sda3
   8     4   13141233 sda4
   8     5     131072 sda5
   8     6     524288 sda6
   8     7     262144 sda7
   8     8    2223172 sda8

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

# /sbin/fdisk -l -u /dev/sda
 
Disk /dev/sda: 586.7 GB, 586772643840 bytes
255 heads, 63 sectors/track, 71337 cylinders, total 1146040320 sectors
Units = sectors of 1 * 512 = 512 bytes
 
   Device Boot      Start         End      Blocks  Id System
/dev/sda1   *          63     6281414     3140676  a5 FreeBSD
/dev/sda2         6281415    12562829     3140707+ 83 Linux
/dev/sda3        12562830    12819869      128520  82 Linux swap
/dev/sda4        12819870    39102335    13141233   0 Empty

# cat /proc/partitions 
major minor  #blocks  name
 
   8     0  573020160 sda
   8     1    3140676 sda1
   8     2    3140707 sda2
   8     3     128520 sda3
   8     4   13141233 sda4
   8     5     131072 sda5
   8     6     524288 sda6
   8     7     262144 sda7
   8     8    2223172 sda8

# hdparm -z /dev/sda                         
 
/dev/sda:
 re-reading partition table

# /sbin/fdisk -l -u /dev/sda
 
Disk /dev/sda: 586.7 GB, 586772643840 bytes
255 heads, 63 sectors/track, 71337 cylinders, total 1146040320 sectors
Units = sectors of 1 * 512 = 512 bytes
 
   Device Boot      Start         End      Blocks  Id System
/dev/sda1   *          63     6281414     3140676  a5 FreeBSD
/dev/sda2         6281415    12562829     3140707+ 83 Linux
/dev/sda3        12562830    12819869      128520  82 Linux swap
/dev/sda4        12819870    39102335    13141233   0 Empty

# cat /proc/partitions 
major minor  #blocks  name


============================ After reformat the disk: ==================================
# hdparm -z /dev/sda                  
 
/dev/sda:
 re-reading partition table
# /sbin/fdisk -l -u /dev/sda
 
Disk /dev/sda: 586.7 GB, 586772643840 bytes
255 heads, 63 sectors/track, 71337 cylinders, total 1146040320 sectors
Units = sectors of 1 * 512 = 512 bytes
 
Disk /dev/sda doesn't contain a valid partition table

# cat /proc/partitions 
major minor  #blocks  name
 
   8     0  573020160 sda
 
boss# sudo ssh pc1 imageunzip -s 1 - /dev/$DSK < /usr/testbed/images/FBSD64-GENERIC.ndz
Wrong magic number in DOS partition table
Failed to read MBR
boss# sudo ssh pc1 imageunzip -s 2 - /dev/$DSK < /usr/testbed/images/FEDORA8-STD.ndz
Wrong magic number in DOS partition table
Failed to read MBR
boss# sudo ssh pc1 imageunzip - /dev/$DSK  < /usr/testbed/images/FBSD64+FC8-STD.ndz
Wrote 20020396032 bytes (2662879744 actual) in 93 seconds
3369 max bufs, 38010880 max memory
3268 buffers split

# cat /proc/partitions 
major minor  #blocks  name
 
   8     0  573020160 sda

# /sbin/fdisk -l -u /dev/sda
 
Disk /dev/sda: 586.7 GB, 586772643840 bytes
255 heads, 63 sectors/track, 71337 cylinders, total 1146040320 sectors
Units = sectors of 1 * 512 = 512 bytes
 
   Device Boot      Start         End      Blocks  Id System
/dev/sda1   *          63     6281414     3140676  a5 FreeBSD
/dev/sda2         6281415    12562829     3140707+ 83 Linux
/dev/sda3        12562830    12819869      128520  82 Linux swap
/dev/sda4        12819870    39102335    13141233   0 Empty


# cat /proc/partitions 
major minor  #blocks  name
 
   8     0  573020160 sda

# hdparm -z /dev/sda                  
 
/dev/sda:
 re-reading partition table
# cat /proc/partitions 
major minor  #blocks  name
 
   8     0  573020160 sda
   8     1    3140676 sda1
   8     2    3140707 sda2
   8     3     128520 sda3
   8     4   13141233 sda4
   8     5     131072 sda5
   8     6     524288 sda6
   8     7     262144 sda7
   8     8    2223172 sda8

# /sbin/fdisk -l -u /dev/sda
 
Disk /dev/sda: 586.7 GB, 586772643840 bytes
255 heads, 63 sectors/track, 71337 cylinders, total 1146040320 sectors
Units = sectors of 1 * 512 = 512 bytes
 
   Device Boot      Start         End      Blocks  Id System
/dev/sda1   *          63     6281414     3140676  a5 FreeBSD
/dev/sda2         6281415    12562829     3140707+ 83 Linux
/dev/sda3        12562830    12819869      128520  82 Linux swap
/dev/sda4        12819870    39102335    13141233   0 Empty