Wiping bootenv.rc on x86

At some point over the last week I managed to swap the contents of my bootenv.rc for "hello world", well not quite, it actually contained bootfile='kernel/amd64/unix'. Theres nothing wrong with the entry per say, the problem is ALL the other entries had been over written. The system stayed up and continued running until I made the mistake of rebooting the box.

The symptoms of my over zealous redirect showed the following on the screen \*snip\* bios boot.... grub boot loader.. starts default boot of multiuser \*snip\* SunOS Release 5.11 Version XXX 64-bit Copyright 1983-2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. few lines of panic info and then back to bios, repeat as required. The solution was to boot a single user session, ie the failsafe session in gnome and edit the root partition. When booting the failsafe mini rooot asked if I wanted to mount the OS it found on the system. I agreed and my regular root filesystem was mounted as /a. I examined the contents of /a/boot/solaris/bootenv.rc and noticed the problem. I examined the contents of the miniroot bootenv.rc

\*snip\*

setprop kbd-type US-English
setprop ata-dma-enabled 1
setprop atapi-cd-dma-enabled 1
setprop ttyb-rts-dtr-off false
setprop ttyb-ignore-cd true
setprop ttya-rts-dtr-off false
setprop ttya-ignore-cd true
setprop ttyb-mode 9600,8,n,1,-
setprop ttya-mode 9600,8,n,1,-
setprop lba-access-ok 1
setprop prealloc-chunk-size 0x2000
setprop input-device 'keyboard'
setprop output-device 'screen'
\*/snip\*
ok no big problem, copy the file to /a/boot/solaris/bootenv.rc and just add the bootpath and bootfile. The bootpath can be got from the current device tree
ls -l /dev/dsk/c0d1s0
lrwxrwxrwx   1 root     root          50 Sep 16 10:46 /dev/dsk/c0d1s0 -> ../../devices/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:a
based on this we add
bootpath='/pci@0,0/pci-ide@7,1/ide@0/cmdk@1,0:a'
to the bootenvrc, since we want to boot 64bit add the entry which caused the problem in the 1st place
bootfile='kernel/amd64/unix'
almost forgot to set the kbd type
setprop kbd-type 'UK-English'
reboot and were back....
Comments:

Post a Comment:
Comments are closed for this entry.
About

nickyv

Search

Archives
« April 2014
MonTueWedThuFriSatSun
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
    
       
Today