Repair boot sector after stupidly importing disk into vg?


 
Thread Tools Search this Thread
Operating Systems AIX Repair boot sector after stupidly importing disk into vg?
# 1  
Old 04-25-2008
Repair boot sector after stupidly importing disk into vg?

Hey guys,

I've bought a second-hand RS/6000 hardware with freshly installed AIX 5.3 on disk2 and freshly installed AIX 6 on disk1. I'm in possession of the original 5.3 install cds but the AIX 6 installation is just on the disk, I've no install media.

So first after getting the system, I wanted to save that AIX 6 installation if I do something wrong. Well...to accomplish that, I did boot into AIX 5.3, mounted a remote samba-share and wanted to mount that AIX 6 partitions/filesystems to dump them to the samba-share. Due to the fact that I was stupid, I imported disk1 (AIX6) into the volume group of my running AIX5.3 installation (thinking, this would be an equivalent to mounting, shame on me, now I know better but I'm completely new to AIX after working with Linux/BSD since years).

But before I did mount the volumes, I realized that it would be better to make a real disk dump via dd. So I did a dump of hdisk1 (while running AIX 5.3, hdisk0 is the 5.3 installation and hdisk1 is the AIX 6 installation) sucessfully.

Then, I changed the boot sequence via SMS (OpenFirmware) back to the first physical disk to boot AIX 6 again and play around with it. But guess what...it does not boot anymore (LED-message: "0557 ROOT MNT FAILED" and I see a white screen with "Starting Software, please wait" and a text block with "--------Welcome to AIX\nCurrent Time Stamp...\nKernel...\nBoot device\n------ but I can't enter anything).

So what can I do to make the AIX 6 installation boot again? I did a lot of google'ing but did not found any hints for my case. Well, I found hints to tools like bootlist and bosboot but I'm afraid to do more harm to the system. For me, it seems like the disk with AIX 6 has some corrupted boot/mounting root code and/or faulty volume group definition due to my stupid import of it into the other volume group (yes, I did export the AIX 6 disk from the AIX 5.3 volume group afterwards). The volumes itself of the AIX 6 installation seem to be ok (according to lqueryvg).

It would be great to hear some (rtfm-)hints, I really want to rescue that installation and learn AIX :-)

Greets, David
# 2  
Old 04-25-2008
I have bad news for you: by importing the disk into the another VG you ruined the boot sector - the boot code for AIX 6.1 is now overwritten by the boot code of AIX 5.3, which is different. The only way to restore it is to have a running 6.1 system which could write the boot sector over the disk. (To put it in a slang you might be more familiar with: its like issuing a "fdisk /mbr" on the disk.)

Once you get your machine running again, "dd" is not the tool to do backups at all in AIX. There is a tool called "mksysb" which completely backs up all the system area into a bootable image. Use a tape device as destination and you have a perfectly bootable (and restorable) system image on tape. You can also use a file (even on the originating system) as destination, bot you will need an external boot device (such as a CD, another tape, etc.) to boot from that and only then use the file to restore the system.

You might also want to read about the Logical Volume Manager (LVM) of AIX. It is the oldest and most mature one in the industry and most of the other UNIX suppliers have either copied its concepts (Linux LVMs) or outright licensed it (like HP for example). You should never use the rootvg (the default volume group of any AIX system) for non-system data, for instance - and after reading up on the concepts behind LVM you will know why.

There is a very good systems administration tool, called "SMIT". Start it by issuing "smit" (better yet: "smitty", to start it in non-graphic mode) and you can do most of the systems administration tasks. SMIT uses standard system commands and you can even look at how its doing it by pressing "PF6" in one of the final screens. Up comes a window with the command SMIT would issue. This way you can learn a lot about how things are done in AIX.

I hope this helps.

bakunin
# 3  
Old 04-28-2008
Thanks a lot for your informative answer, even if I now know that I'm screwed completely ;-)

Smitty is my tool of choice since the first boot of AIX, without it I would not have known how to replace ksh with my beloved bash.

BTW: is it rather normal for the RS/6000 Hardware to need about 5 minutes after powering on to get to the OpenFirmware prompt? A lot of 4-digit codes change on the led while booting so I think thats quite usual...

Greets, David
# 4  
Old 06-03-2008
approx 5 minutes is normal for some machines before you get the first selection screen.
Login or Register to Ask a Question

Previous Thread | Next Thread

7 More Discussions You Might Find Interesting

1. Solaris

Use 'dd' to copy boot disk to larger target disk

Hi, I'm looking to copy a boot disk on an old Solaris 8 system using dd. I'll bring the system down to single user mode and begin from there. I'm copying my source disk to a larger target disk. Do I need to do anything other than the 'dd' command below because the target disk is bigger? ... (2 Replies)
Discussion started by: sparcman
2 Replies

2. Solaris

How to specify local boot up disk in CD boot Grub?

Hi Solaris 10 Experts, I am wondering what is the correct syntax to edit in Grub when trying to specify the local ZFS boot disk while booting up from a Solaris 10 x86 64bits DVD installation disk. In other word, I try to boot up from local disk without removing the Solaris installation disk... (0 Replies)
Discussion started by: gjackson123
0 Replies

3. Shell Programming and Scripting

(probably stupidly simple) if [ $var1 = $var2 ] problem...

OK, while I'm not new to the Mac or some of the the inner workings of Mac OS X I am quite new to scripting. And while I have "Learning the Bash Shell" by those lovely people at O'Reilly (Cameron Newham et. al.) I'm missing something, I just know I am. Here's the problem: At the beginning of... (2 Replies)
Discussion started by: woodgie
2 Replies

4. Filesystems, Disks and Memory

Volume Manager; importing a disk

System: Alpha with Tru64 5.1b Disk under LSM (Logical Storage Manager; essentially v2 of Veritas VxVM) control was generating disk errors. The disk was timing out a lot and generating a few disk errors. DBAs couldn't keep the oracle instance up on that node of the cluster. I contacted HP and got... (1 Reply)
Discussion started by: BOFH
1 Replies

5. Programming

Accessing info from Boot Sector of Diskette

I am writing a Floppy Disk Driver and need to find out what the "Sectors per track", "Tracks per cylinder", and the "number of cylinders" on a disk. I have a book that tells me that this info is held in the boot sector of the disk in locations such as: 0x18 0x19 Sectors per track But... (0 Replies)
Discussion started by: compdaugh
0 Replies

6. Filesystems, Disks and Memory

boot sector bad? or is is something else?

SuSE 8 Both LILO and GRUB are complaining about not being able to write to the boot sector. Is this definitely a problem with the drive or is there another possible problem? I've checked the BIOS and I don't think the problem is there....it's probably the drive. Just another Linux user (1 Reply)
Discussion started by: HumanBeanDip
1 Replies

7. UNIX for Dummies Questions & Answers

boot sector for Solaris 8

Hi all, I was wondering if anyone knows how to make a boot sector for Solaris 8. I'm trying to install solaris 8 via the network and I'm get error "files just loaded does not seem to be executable" at the ok propmt. Has anyone encouter this problem before? THANKS advance (1 Reply)
Discussion started by: larry
1 Replies
Login or Register to Ask a Question