Recoving OpenSolaris root and grub

Twenty years ago I fat fingered my workstation. Then it was using "newfs -n" rather than "newfs -N", shortly after the system paniced unable to find i-node 2. I had to restore. Restoring a diskless 3/50 running SunOS 3.5 was only less painful because I used to dump, when dump was dump not ufsdump, the network disk partitions of all the clients every night. Sorry I digress but it is still burned on my memory.

Today I fat fingered my laptop. I managed to type a script, at the command prompt, that ran with root priveleges and ended up doing "cd ../.. ; rm -r \*". That took it to /. I stopped it but the damage was already done. However since I am running OpenSolaris and had taken the precaution of taking a recursive snapshot of the pool after I last installed any software all I had to do was roll back the filesystems.

Specifically I had to roll back:

  • rpool - It contains the grub menu or at least it does once I recovered it.

  • rpool/ROOT - I'm not sure I had to roll this one back but it seemed wise.

  • rpool/ROOT/opensolaris - yes the real root file system. The lack of a kernel was certain to cause problems.

  • rpool/ROOT/opensolaris/opt - again I'm not sure I had to roll this one back but it seems best to keep the root file systems consistent.

I need to bring those auto snapshot scripts over.

I'll get to describe what I was doing later. It was very cool, well quite cool.

Comments:

You can also use "beadm" to manage the boot environments, all with one command.

# beadm activate before-fat-finger

Posted by osoluser on May 20, 2008 at 04:53 PM BST #

Thanks. I need to check up on beadm, like would it have saved my grub setup and can it be run from the live CD which I had to boot to get life back into the laptop.

Even without it though the recovery was a joy to behold.

Posted by Chris Gerhard on May 21, 2008 at 06:46 AM BST #

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

This is the old blog of Chris Gerhard. It has mostly moved to http://chrisgerhard.wordpress.com

Search

Archives
« July 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
31
   
       
Today