NetBSD-Users archive

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

Re: Prepping to install: a digression



On 07/01/15 19:38, Robert Elz wrote:
     Date:        Wed, 01 Jul 2015 10:40:24 -0453
     From:        "William A. Mahaffey III" <wam%hiwaay.net@localhost>
     Message-ID:  <55940871.60702%hiwaay.net@localhost>

   | However, this time
   | I can boot back into the boot media when I plug it in & reboot, I think
   | because I *didn't* do the 'raidctl -A root raid0' command during my
   | shell excursion.

That would be why - and you really do NOT want to do that until you are
certain that everything is correctly set up and working.

Boot back to the state you showed at the end of LIST.setup2.txt (the
output from setup0 and setup1 was not useful - that's just stuff working
normally, we do not need to see that).

That is, boot with root on sd0a and the (later intended) root on /altroot
with /altroot/usr also mounted (/altroot/home should make no difference one
way or the other).

Next
	chroot /altroot

At that point run a bunch of commands and make sure everything is working
(and check that /sbin/init exists and is executable - yoy won't be able to
run that one).  Check that /dev is sane (entries for the raids you need,
the wd devices you have, console, null, ptys, ... (or completely empty).

Check, there are many entries in /dev, notable for all wd's, raid's, console, null, ptys, etc. Commands that I tried worked sanely. No man pages, but a few things in /bin & /sbin. I didn't try them all, but what I did worked sanely. If you need more specific info, don't hesitate to ask for it.


Run fdisk on wd0 (or whichever drive you intend to actually boot from),
(While you are still chrooted to /altroot).

See attached. Note that the attached was created a few days ago, *not* from the chrooted environment, however, I wrote down most of what I thought was the critical info from the chroot'ed output, & it is identical to the attached file. Fdisk info for wd1 is identical, w/ only the partition referenced different. I also attach disklabel info for wd0, & again, wd1 is identical except for referenced disk.


Make sure it is correctly set up, it should have an MBR, or PMBR, and
should be marked as bootable, with a bootable partition on it, and boot
code correctly installed.   Make sure you can understand how that code is
going to locate /boot (if you want it to use the one that is in /altroot,
then the offsets of the partitions all need to be just right - you will
need to get someone who has set up actually booting from a raid1 to verify
your setup, I don't run my systems that way, I prefer a separate boot
partition on wd0 (duplicated on wd1 or wd2 or whatever is appropriate).

See attached fdisk info, PBR is *not* bootable, so I guess I start there .... What next ?


Also check that the bios is set to actually boot from the drive you think,
which can be tricky if you have a whole bunch of basically identical drives.
What the bios thinks of as the boot drive might not be the one you are
expecting.

BIOS boots from USB 1st, then HDD, w/ HDD order from 1 to 6, for 6 identical drives, possibly an issue as you allude to, but that is down the road for now.


For problems at that stage, what is important to see is not the raid setup,
but the drive layouts, labels (fdisk, gpt, disklabel - whatever is actually
in use) of the boot drive, and the boot raid partition.

Once you have all that right, as best you believe it can be, boot without
sd0 (the thumb drive, I assume) connected - in that state, if you get to
the state where the system looks to be booting, but cannot find a root
filesystem (that is, if the kernel boots, lists the hardware, etc, and then
fails to find root) then you're in a good situation.

If it is still unable to boot, you don't have the boot setup correct yet,
and you will need to work on that part - making stde the MBR or PMBR is
correct, installboot has been done correctly, and should be able to locate
/boot at one of the (very few) places it looks.

Once booting is right to the state of not finding root, and if you have
done the chroot part above, and are fairly sure that the system is correctly
installed and all the important parts are there, then you should reboot
from sd0, and do the "raidctl -A root raid0" bit so that raidframe will make
raid0a the root filesystem - then reboot again without sd0 and all should
be OK.

Finally, if you need to (almost) start all of this again (which you easily
might) - skip everything related to /home.   You don't need all that space
just to get booted, and initing that 3.5TB raid takes a long time.  Everything
else should be fairly fast - so it is less painful to do it again, and again,
until it all works.   Once the system is properly up and running, you can
easily configure that raid array using the running system, mount it on /mnt.
copy whatever you might have added to /home in the interim to it, fix fstab
to mount it on /home, and then reboot.    But only after you can boot, and
shutdown and reboot, successfully, and with no hassles, without it.

kre



--

	William A. Mahaffey III

 ----------------------------------------------------------------------

	"The M1 Garand is without doubt the finest implement of war
	 ever devised by man."
                           -- Gen. George S. Patton Jr.

Disk: /dev/rwd0d
NetBSD disklabel disk geometry:
cylinders: 1938021, heads: 16, sectors/track: 63 (1008 sectors/cylinder)
total sectors: 1953525168

BIOS disk geometry:
cylinders: 1024, heads: 255, sectors/track: 63 (16065 sectors/cylinder)
total sectors: 1953525168

Partitions aligned to 16065 sector boundaries, offset 63

Partition table:
0: NetBSD (sysid 169)
    start 2048, size 1953523120 (953869 MB, Cyls 0/32/33-121601/80/63), Active
        PBR is not bootable: All bytes are identical (0x00)
1: <UNUSED>
2: <UNUSED>
3: <UNUSED>
Bootselector disabled.
First active partition: 0
# /dev/rwd0d:
type: ESDI
disk: HGST HTS721010A9
label: disk0
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 1938021
total sectors: 1953525168
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0		# microseconds
track-to-track seek: 0	# microseconds
drivedata: 0 

6 partitions:
#        size    offset     fstype [fsize bsize cpg/sgs]
 a:  33554432      2048       RAID                     # (Cyl.      2*-  33290*)
 c: 1953523120      2048     unused      0     0        # (Cyl.      2*- 1938020)
 d: 1953525168         0     unused      0     0        # (Cyl.      0 - 1938020)
 e:  33554432  33556480       swap                     # (Cyl.  33290*-  66578*)
 f: 1886414256  67110912       RAID                     # (Cyl.  66578*- 1938020)


Home | Main Index | Thread Index | Old Index