[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] problem cobalt restore
- Subject: [cobalt-users] problem cobalt restore
- From: FIOLLE Frédéric <cobalt@xxxxxxxxxxxxxxxx>
- Date: Mon Oct 6 00:54:01 2003
- List-id: Mailing list for users to share thoughts on Sun Cobalt products. <cobalt-users.list.cobalt.com>
Sorry, i ve post the message with an other mail ...
So i have this message during install (in console mode).
I don't know why it reboot before the end of install....
What i see when i connect to console port during the restore CD.
echo -n "Golden Master Checksum: "
./sumdisk ${MNT_DIR:?} sumfile.GM
cp ${TMP_DIR:?}/cobalt_error.log cobalt_error.GM
./stripid cobalt_error.GM
fi
}
function init_for_GM_yes
{
__calculate_GM_sumfile
}
function __indulge_in_manufacturing_paranoia
# If we're doing net build, check for unexpected errors in
cobalt_error.log # This is just general paranoia for manufacturing {
./stripid ${TMP_DIR:?}/cobalt_error.log
local sum_bld=`sum $TMP_DIR/cobalt_error.log | cut -f1 -d" "`
local sum_gm=`sum cobalt_error.GM | cut -f1 -d" "`
if [ $sum_bld -ne $sum_gm ]; then
inform BUILD FAILED
rm ${MNT_DIR:?}/boot/vmlinux.gz
sleep 10000
fi
}
function __await_verification
{
while [ -e sum.calc ]; do
sleep 5
done
if [ ! -e sum.OK ]; then
inform VERIFICATION FAILED
sleep 10000
fi
}
function __verify_synchronously
{
local installer=/nfsroot/${PRODUCT:?}_${BUILD:?}/installer
rsh tester touch $installer/sum.calc
./sumdisk ${MNT_DIR:?} ${TMP_DIR:?}/sumfile
local sum_gm=`sum sumfile.GM | cut -f1 -d" "`
local sum_build=`sum $TMP_DIR/sumfile | cut -f1 -d" "`
if [ $sum_gm -eq $sum_build ]; then
rsh tester touch $installer/sum.OK
rsh tester rm $installer/sum.calc
else
rsh tester rm $installer/sum.calc
inform VERIFICATION FAILED
sleep 10000
fi
}
function verify_install
{
if [ ${NET_BUILD:?} = yes -a ${EXP_BUILD:?} = no ]; then
inform Manufacturing "paranoia check"
__indulge_in_manufacturing_paranoia
fi
if [ $NET_BUILD = yes -a $EXP_BUILD = no -a ! -e sum.OK ]; then
if [ -e sum.calc ]; then
inform Awaiting verification
__await_verification
else
inform Verifying release
__verify_synchronously
fi
fi
}
function __2700C_super_hack
# This isn't just a hack, this is a SUPER-hack. If we're doing a net
build, # and if that netbuild is a production build, and if the product
is a 2700C # (that's a Cache Qube to you and me), then set up the qube
to have the IP # that it currently has from the net build, name it, and
set up it's network. # This is so manufacturing can reboot the qube all
the way and verify that # the build worked. {
local host_ip=`/bin/hostname -i`
local host_name=`nslookup $host_ip | grep Name | cut -f 5 -d" "`
# use positional parameters to grab the list returned by gawk.
# the -e option to set keeps it from echoing the environment
variables
# if the ifconfig-gawk combo spits nothing; this would set the
positional
# parameters to null
set -e `/sbin/ifconfig eth0 | /bin/gawk '/Mask/ {
split ($0, a, /[: ]+/);
print a[6], a[8];
}'`
local host_bcast=$1;
local host_nmask=$2;
set -e `/sbin/route -n | /bin/gawk '
/eth0/ && !/default/ { print $1; }
/^0.0.0.0/ { print $2; }'`
local host_network=$1;
local host_gateway=$2;
# Set up /etc/resolv.conf
cp /etc/resolv.conf ${MNT_DIR:?}/etc/resolv.conf
# Set up /etc/sysconfig/network
cat > $MNT_DIR/etc/sysconfig/network <<-EOF
# Set up /etc/HOSTNAME
echo $host_name > $MNT_DIR/etc/HOSTNAME
# Set up /etc/NET-CONFIG
echo BOOTPROTO=lcd > $MNT_DIR/etc/NET-CONFIG
# Set up /etc/sysconfig/network-scripts/ifcfg-eth0
cat > $MNT_DIR/etc/sysconfig/network-scripts/ifcfg-eth0 <<-EOF }
function do_final_hacks
{
if [ ${NET_BUILD:?} = yes ]
then
if [ ${DESTRUCTIVE:?} = yes ]
then
inform lyle super-hack
__2700C_super_hack
fi
fi
}
function set_raiddevices
{
cat ${raid_table}.tmp${part} | awk '
BEGIN { split ( ENVIRON["disks"], disks )
part=ENVIRON["part"]
raidlevel=ENVIRON["this_raid"] }
/^\[MD/ {
if ( match($0,part) == 4 ) {
if ( raidlevel == 5 ) {
printf( "chunk-size\t32\n")
printf( "parity-algorithm\tleft-symmetric\n")
} else {
printf( "chunk-size\t4\n")
}
for ( x in disks ) {
printf( "device\t/dev/%s%s\n",disks[x],part )
printf( "raid-disk\t%s\n",x-1 )
}
} else { print }
}
! /^\[MD/ { print }
' > ${raid_table}
}
function make_raidtab
{
# First see how many disks we have
disks=$(cd /proc/ide; ls -d hd*)
numdisk=$(echo $disks | wc -w )
echo "Number of disks is: $numdisk"
if [ $numdisk = 1 ]; then
raid_type=0
else
if [ $numdisk = 2 ]; then
raid_type=1
else
raid_type=5
fi
fi
echo "Raid type is: $raid_type"
# [ We really need to make these partitions dynamic ]
for part in 1 3 4 6; do
# This is all probably best done in a single awk script, but I'm
# too lazy to do it
if [ $part = 4 ]; then
this_raid=0
else
this_raid=${raid_type}
fi
cat $raid_table | sed \
-e "s/\[MD${part}RAIDLEVEL\]/${this_raid}/" \
-e "s/\[MD${part}RAIDDISKS\]/${numdisk}/" >
${raid_table}.tmp${part}
export part disks this_raid
set_raiddevices
done
}
# ifuncs ends here
: ${MNT_DIR:=/mntdir}
+ : /mntdir
: ${MNT_DIR_CHK:=yes}
+ : no
: ${DEST_DEV:=/dev/hda}
+ : /dev/hda
: ${NET_BUILD:=no}
+ : yes
: ${EXP_BUILD:=no}
+ : no
: ${GM:=no}
+ : no
: ${DESTRUCTIVE:=yes}
+ : yes
: ${RAID:=no}
+ : no
#
# common locations for raid utils
sfdisk="/sbin/sfdisk -f -L -uM"
+ sfdisk=/sbin/sfdisk -f -L -uM
raidstop="/sbin/raidstop"
+ raidstop=/sbin/raidstop
mkraid="/sbin/mkraid"
+ mkraid=/sbin/mkraid
#
# common options used
raid_table="$TMP_DIR/raidtab"
+ raid_table=/test/NOW-20031006.00B70B/raidtab
partition_table="$TMP_DIR/ptable"
+ partition_table=/test/NOW-20031006.00B70B/ptable
fs_table="$TMP_DIR/fstab"
+ fs_table=/test/NOW-20031006.00B70B/fstab
mkfs_opts="$TMP_DIR/mkfs_opts"
+ mkfs_opts=/test/NOW-20031006.00B70B/mkfs_opts
rm -f ${TMP_DIR:?}/cobalt_error.log
+ rm -f /test/NOW-20031006.00B70B/cobalt_error.log
# Check if that device is mounted right now
# if so, bail out; I'm drivin' this thing
if mount | grep "$DEST_DEV" ; then
echo "$DEST_DEV is mounted, umount before installing."
echo "Terminating."
exit 1
fi
+ mount
+ grep /dev/hda
# describe our situations (by parsing fstab, not hard coding it)
FSTAB_DEV=`awk '/\/dev\/.*1/ {print $1}' < $fs_table | sed -e
's/[0-9]//'` awk '/\/dev\/.*1/ {print $1}' < $fs_table | sed -e
's/[0-9]//'
++ awk /\/dev\/.*1/ {print $1}
++ sed -e s/[0-9]//
+ FSTAB_DEV=/dev/hda
# check for RAID support
if [ $FSTAB_DEV = "/dev/md" ]; then
RAID=yes
DEST_DEV=$FSTAB_DEV
echo Building system with RAID support
echo WARNING: disk-to-disk builds will not work
fi
+ [ /dev/hda = /dev/md ]
echo Destination device: $DEST_DEV
+ echo Destination device: /dev/hda
Destination device: /dev/hda
awk '/^\/dev\/.*/ {printf("Destination %s partition: %s\n", $2,
substr($1, lengt h($1)))}' < $fs_table
+ awk /^\/dev\/.*/ {printf("Destination %s partition: %s\n", $2,
+ substr($1, leng
th($1)))}
Destination / partition: 1
Destination swap partition: 6
Destination /var partition: 3
Destination /home partition: 4
# build the filesystem_list out of the supplied fstab
export DEST_DEV MNT_DIR
+ export DEST_DEV MNT_DIR
filesystem_list=`awk '/^\/dev\/.*/ && ! /swap/ {printf ("%s%s ",
ENVIRON["DEST_D EV"], substr($1, length($1)))}' < $fs_table` awk
'/^\/dev\/.*/ && ! /swap/ {printf ("%s%s ", ENVIRON["DEST_DEV"],
substr($1, length($1)))}' < $fs_table
++ awk /^\/dev\/.*/ && ! /swap/ {printf ("%s%s ", ENVIRON["DEST_DEV"],
++ substr($1
, length($1)))}
+ filesystem_list=/dev/hda1 /dev/hda3 /dev/hda4
# build the mount_map out of the supplied fstab
mount_map=`awk '/^\/dev\/.*/ && ! /swap/ {printf ("%s%s %s%s ",
ENVIRON["DEST_DE V"], substr($1, length($1)), ENVIRON["MNT_DIR"], $2)}'
< $fs_table` awk '/^\/dev\/.*/ && ! /swap/ {printf ("%s%s %s%s ",
ENVIRON["DEST_DEV"], substr ($1, length($1)), ENVIRON["MNT_DIR"], $2)}'
< $fs_table
++ awk /^\/dev\/.*/ && ! /swap/ {printf ("%s%s %s%s ",
++ ENVIRON["DEST_DEV"], subs
tr($1, length($1)), ENVIRON["MNT_DIR"], $2)}
+ mount_map=/dev/hda1 /mntdir/ /dev/hda3 /mntdir/var /dev/hda4
+ /mntdir/home
PATH=/sbin:/usr/sbin:$PATH
+ PATH=/sbin:/usr/sbin:/bin:/sbin:/usr/bin:/usr/sbin
# Qualification, before and after scripts use `ROOT'
export ROOT=$MNT_DIR
+ export ROOT=/mntdir
+ ROOT=/mntdir
# Setup the partition table on the disk (yes, this is dangerous) if [
$DESTRUCTIVE = yes ]; then
inform Partitioning disk
#
# Check for RAID
if [ $RAID = yes ]; then
# Check to see if we have a "dynamic" raidtab. This is a raidtab
# where the disk configuration will be determined by the number of
# disks.
if ! grep --quiet ^raid-disk $raid_table; then
make_raidtab
fi
#
# Attempt to stop RAID activity
for array in 1 6 3 4 5 ; do
[ -e "/dev/md$array" ] || continue
$raidstop -c $raid_table /dev/md$array
done
#
# this really should parse the raidtab.
# <hack> <cough> ... tim?
# This should work for both "static" and dynamic raidtabs...
disks=$(cd /proc/ide; ls -d hd*)
for disk in $disks ; do
[ -e /dev/$disk ] || continue
$sfdisk /dev/$disk < $partition_table
done
else
# Attempt to stop the RAID devices for a normal build
touch $TMP_DIR/faketab
for array in 1 6 3 4 5 ; do
[ -e "/dev/md$array" ] || continue
$raidstop -c $TMP_DIR/faketab /dev/md$array
done
rm $TMP_DIR/faketab
$sfdisk $DEST_DEV < $partition_table
fi # RAID
# Make the filesystems
cat $fs_table |
awk '/^\/dev\/.*/ && ! /swap/ {print substr($1, length($1))}' |
while read fs; do
filesys="${DEST_DEV}$fs"
opts=`cat $mkfs_opts | egrep "^$filesys" | cut -f2`
inform Formatting $filesys
# Stop if we had RAID drives already
if [ $RAID = yes ]; then
# $raidstop -c $raid_table $filesys
$mkraid -q --really-force -c $raid_table $filesys
fi
cat /proc/mdstat
sleep 5
mke2fs -m 0 $opts $filesys
cat /proc/mdstat
sleep 5
done
else
# Qualify old software, mount, test, umount before re-partitioning.
must mount_all_filesystems "$filesystem_list"
run_scripts $TMP_DIR/BASE_QUALIFY_SCRIPTS
must umount_all_filesystems "$filesystem_list"
# Make the filesystems (except for home)
cat $fs_table |
grep -v home |
awk '/\/dev\/hda/ && ! /swap/ {print substr($1, length($1))}' |
while read fs; do
inform Formatting ${DEST_DEV}$fs
mke2fs -m 0 ${DEST_DEV}$fs
done
fi # DESTRUCTIVE
+ [ yes = yes ]
+ inform Partitioning disk
+ echo Partitioning disk
Partitioning disk
+ [ yes = yes ]
+ /sbin/writelcd Partitioning disk
+ true
+ [ no = yes ]
+ touch /test/NOW-20031006.00B70B/faketab
+ [ -e /dev/md1 ]
+ /sbin/raidstop -c /test/NOW-20031006.00B70B/faketab /dev/md1
/dev/md1: No such device
+ [ -e /dev/md6 ]
+ /sbin/raidstop -c /test/NOW-20031006.00B70B/faketab /dev/md6
/dev/md6: No such device
+ [ -e /dev/md3 ]
+ /sbin/raidstop -c /test/NOW-20031006.00B70B/faketab /dev/md3
/dev/md3: No such device
+ [ -e /dev/md4 ]
+ /sbin/raidstop -c /test/NOW-20031006.00B70B/faketab /dev/md4
/dev/md4: No such device
+ [ -e /dev/md5 ]
+ /sbin/raidstop -c /test/NOW-20031006.00B70B/faketab /dev/md5
/dev/md5: No such device
+ rm /test/NOW-20031006.00B70B/faketab
+ /sbin/sfdisk -f -L -uM /dev/hda
Checking that no hda:-one is using th hda1is disk right no hda2w ... <
hda5 hda6 > hda3 hda4 OK
Disk /dev/hda: 12009 cylinders, 16 heads, 63 sectors/track
Old situation:
Units = megabytes of 1048576 bytes, blocks of 1024 bytes, counting from
0
Device Boot Start End MB #blocks Id System
/dev/hda1 0+ 750- 751- 768095+ 83 Linux
/dev/hda2 750+ 908- 159- 162288 5 Extended
/dev/hda3 908+ 1108- 201- 205128 83 Linux
/dev/hda4 1108+ 5910- 4802- 4917024 83 Linux
/dev/hda5 750+ 780- 31- 30743+ 83 Linux
/dev/hda6 780+ 908- 129- 131543+ 82 Linux swap
New situation:
Units = megabytes of 1048576 bytes, blocks of 1024 bytes, counting from
0
Device Boot Start End MB #blocks Id System
/dev/hda1 0+ 750- 751- 768095+ 83 Linux
/dev/hda2 750+ 908- 159- 162288 5 Extended
/dev/hda3 908+ 1108- 201- 205128 83 Linux
/dev/hda4 1108+ 5910- 4802- 4917024 83 Linux
/dev/hda5 750+ 780- 31- 30743+ 83 Linux
/dev/hda6 780+ 908- 129- 131543+ 82 Linux swap
Warning: no primary partition is marked bootable (active)
This does not matter for LILO, but the DOS MBR will not boot this disk.
Successfully wrote the new partition table
Re-reading the partition table ...
hda: hda1 hda2 < hda5 hda6 > hda3 hda4
If you created or changed a DOS partition, /dev/foo7, say, then use
dd(1) to zero the first 512 bytes: dd if=/dev/zero of=/dev/foo7 bs=512
count=1 (See fdisk(8).)
+ cat /test/NOW-20031006.00B70B/fstab
+ awk /^\/dev\/.*/ && ! /swap/ {print substr($1, length($1))} read fs
+ filesys=/dev/hda1
cat $mkfs_opts | egrep "^$filesys" | cut -f2
++ cat /test/NOW-20031006.00B70B/mkfs_opts
++ egrep ^/dev/hda1
++ cut -f2
+ opts=
+ inform Formatting /dev/hda1
+ echo Formatting /dev/hda1
Formatting /dev/hda1
+ [ yes = yes ]
+ /sbin/writelcd Formatting /dev/hda1
+ true
+ [ no = yes ]
+ cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid5] [translucent]
read_ahead not set unused devices: <none>
+ sleep 5
+ mke2fs -m 0 /dev/hda1
mke2fs 1.14, 9-Jan-1999 for EXT2 FS 0.5b, 95/08/09
Linux ext2 filesystem format
Filesystem label=
192512 inodes, 768095 blocks
0 blocks (0.00%) reserved for the super user
First data block=1
Block size=1024 (log=0)
Fragment size=1024 (log=0)
94 block groups
8192 blocks per group, 8192 fragments per group
2048 inodes per group
Superblock backups stored on blocks:
8193, 16385, 24577, 32769, 40961, 49153, 57345, 65537, 73729,
81921,
90113, 98305, 106497, 114689, 122881, 131073, 139265, 147457,
155649,
163841, 172033, 180225, 188417, 196609, 204801, 212993, 221185,
229377,
237569, 245761, 253953, 262145, 270337, 278529, 286721, 294913,
303105,
311297, 319489, 327681, 335873, 344065, 352257, 360449, 368641,
376833,
385025, 393217, 401409, 409601, 417793, 425985, 434177, 442369,
450561,
458753, 466945, 475137, 483329, 491521, 499713, 507905, 516097,
524289,
532481, 540673, 548865, 557057, 565249, 573441, 581633, 589825,
598017,
606209, 614401, 622593, 630785, 638977, 647169, 655361, 663553,
671745,
679937, 688129, 696321, 704513, 712705, 720897, 729089, 737281,
745473,
753665, 761857
Writing inode tables: done
Writing superblocks and filesystem accounting information:
Cobalt Networks, Inc. - Connecting the Dots
Firmware version 2.3.18
Current date: Mon Oct 06 07:51:01 UTC 2003
ROM build info: Mon Mar 6 16:55:01 PST 2000 freakshow.cobaltnet.com
System serial number: 3H02AM9460243 Memory found: 256 MB Initializing
I2C bus: done Scanning PCI bus: done Initializing IDE: done
IDE 0 master: found
Initializing SCSI: done
Initializing ethernet: 2 ethernet controllers installed - done
Initializing EEPROMs: done
EEPROM Bank 0: Intel E28F008S5 1MB
EEPROM Bank 1: not installed.
Mounting rom_fs: done
Initializing i18n - language "en": done
Press spacebar to enter ROM mode
Booting default method - From disk
First stage kernel: Decompressing - done
-----Message d'origine-----
De : Bruce Timberlake [mailto:bruce@xxxxxxxxxx]
Envoyé : dimanche 5 octobre 2003 21:05
À : cobalt-users@xxxxxxxxxxxxxxx
Objet : Re: [cobalt-users] problem cobalt restore
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
> Yes but I have no system on the raq, so i can't connect with terminal
> console....
The console port connection only serves as a "monitor" to see what's
going on
while you do the ethernet-based os restore.
Anything that would normally be displayed on a monitor attached to a
regular
Linux box is sent to the serial port on the RaQ.
This might help you see where the restore is failing. -----BEGIN PGP
SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)
iD8DBQE/gGtKvLA2hUZ9kgwRAkorAJ9dG0QhuyIMHjxyyA4RJB/tTVtY2ACfdUXU
KR4SrZJ+bXEFAtIc8d/TZR4=
=Qd13
-----END PGP SIGNATURE-----
_____________________________________
cobalt-users mailing list
cobalt-users@xxxxxxxxxxxxxxx
To subscribe/unsubscribe, or to SEARCH THE ARCHIVES, go to:
http://list.cobalt.com/mailman/listinfo/cobalt-users