Thumbdrive for redundant boot device (OpenSolaris)
July 27, 2008 7:46 pm
First disable automating; this may be volfs or hal depending on the version of solaris 10/11
# svcadm disable volfs
Now plug in the thumbdrive and determine the location for the logical node
bash-3.00# rmformat -l Looking for devices... 1. Logical Node: /dev/rdsk/c0t0d0p0 Physical Node: /pci@0,0/pci-ide@1f,1/ide@0/sd@0,0 Connected Device: TEAC CD-224E-N 1.AA Device Type: CD Reader 2. Logical Node: /dev/rdsk/c4t0d0p0 Physical Node: /pci@0,0/pci15d9,7980@1d,7/hub@5/storage@1/disk@0,0 Connected Device: Corsair Flash Voyager 1.00 Device Type: Removable bash-3.00#
/dev/rdsk/c4t0d0 will be the root of what we’re working with in this example
Now run:
# fdisk -B /dev/rdsk/c4t0d0s0
Now you can get the geometry using the following:
# fdisk -W - /dev/rdsk/c4t0d0s0
Now, look at output from previous step and find max MB (MAXSIZE) of usable storage. You do this by multiplying bytes/sector (usually 512 at the top) with num sectors at the bottom of output (in my case, a 4 GB drive had roughly 7.9Million sections or so) divide by (1024*1024) to yield MB (should be 3900 MB or so for a 4GB flash stick.
slices: 0 = 2MB, {$MAXSIZE-3}MB, "wm", "root" :
1 = 0, 1MB, "wu", "boot" :
2 = 0, {$MAXSIZE - 1}MB, "wm", "backup"
Here is a “slices.txt” file for a 256 mb thumbdrive
slices: 0 = 2MB, 244MB, "wm", "root" : 1 = 0, 1MB, "wu", "boot" : 2 = 0, 246MB, "wm", "backup"
Now put this label to the drive
# rmformat -s ./path/to/slices.txt /dev/rdsk/c4t0d0p0
Now to refresh Solaris devices:
# devfsadm; devfsadm -C
Now to create the filesystem, mount it and copy the necessary files
# newfs /dev/rdsk/c4t0d0s0 # mkdir /mnt/backup # mount /dev/dsk/c4t0d0s0 /mnt/backup # cd /mnt/backup # cp -r /boot ./boot # cp -r /platform ./platform
Now lets make this bootable
# fdisk /dev/rdsk/c4t0d0p0
Set partition 1 active using option 2
# cd /mnt/backup/boot/grub/ # installgrub stage1 stage2 /dev/rdsk/c4t0d0s0
Now safely unmount
# cd /;umount /mnt/backup
references:
Categories: Docs


No Responses to “Thumbdrive for redundant boot device (OpenSolaris)”
Care to comment?
You must be logged in to post a comment.