FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Ok, I seem to have done something majorly stupid. I ran "fsck" on a mounted partition and soon after disaster struck. Immmediately after that it'd started to complain about the "label" of the "/" partition. Instead of fixing it there, I reboot the machine. Then it compained along the lines of about
"Kernel panic - not syncing: No init found. Try passing init= option to kernel."
I tried messing around with the boot paramters in the grub menu that comes up during bootup and which using command line mode seemed to have messed up more stuff. Think it was after e2label. Now, the system boots up directly into "grub>" command. After searching the net for a bit, I tried all suggestions provided including booting from "linux rescue" during which it asks to check for existing linux partitions and it said no linux partitions were found and it threw me into the command shell! I tried "chroot /mnt/sysimage" and it says that "No file or directory was found". When I try doing "root (hd0,0)", I get "Error 22: No Such Partition". If I try "root (hd<tab>", it gives me hd0 but nothing beyond that on further "tabs". Is there ANY possible way for me to rebuild my partition table and retrieve my data. After that I'll be more than happy to rebuild the system.
SystemRescue live-cd, linux ultimatebootcd,or knoppix(or kanotix) live-cd can help rescue partition. If you can read data on disk from other linux install or live-cd then chances are good. But you may end up having to re-install from scratch and use a backup cd/dvd to restore important data. Good luck.
thx for that. I will try and download one of these live Cds and see what can be done. What about Ubuntu Live CD? I have that handy but it couldn't detect my partitions to be linux partition. I think the e2label command forced it to be marked as an "msdos" partition. And even that was fine but no OS is actually reading it as a valid disk. I even tried taking it out and sticking it into a windows machine to see if I can just pick up my config/data files and then rebuild it.
Anybody reading this if they can clue me in on what might be a way to bring this back? What does it mean if my system still boots up into the "grub>" command line. It would definitely mean that it can read some portion of the drive that has grub installed on it right? There's limited commands available in it like partnew etc. Can I use these to rebuild my table?
Sorry I haven't used ubuntu live-cd in ages and can't say if it can be used for rescue. Surely the ubuntu forums have info for it. It would still be good idea to keep a good SystemRescue live-cd(there's anew one available-0.2.17,only 129MB) or knoppix or one of others mentioned. There are books written how to use knoppix for almost everything including coffee making.LOL.
http:www.linuxjournal.com/node462 is a short article "Boot with Grub" by Wayne Marshall discussing grub booting and various tricks available with grub. Hope it helps.
You should be on your way to fixing things up. Good luck
got me the SystemRescue Live CD. VEry very neat product. However didn't solve my issues. It seems like the re-labeling of my / partition ruined everything and it's damaged beyond repair. The only thing that made sense was using "rescue" command in the "parted" but when I used it as follows
I was hoping that it would detect a lost linux partition and allow me to get the data back. When using QTParted or PartGUI, they detect the disk as being free and empty with an "msdos" label on it.
The only thing remaining it seems like is to recreate the partition table by hand. To that end, I figured I'd try using the Ranish Partition Manager but that just sits there during load saying "Loading boot sector....booting..."
Does Knoppix offer any better tools than what are available in SystemRescue? Don't think the grub booting will help other than using the Part* commands to maybe help me recreate the partition.
Let me know if you have any more thoughts on this.
Dont know if you can recover any data.fdisk -l will list partitions found.gpart and gnuparted or gparted or qtparted could help.http://staff.washington.edu/trav/lin...partition.html may guide you. If you had XP use the install cd for recovery console to fix mbr or Win98 floppy to fix /mbr. You should get XP boot back.Leave XP's partition as bootable. If things are too ruined then re-install Xp then try ubuntu or FC install. (FC4 or 5 review had some warning regarding partitioning.Things can get ruined. Check FC forum to be sure.) Suse10 is supposed to be easy install. kanotix2005-04 or mepis are easy installs too.knoppix web page tells more about it.
Once XP is back,SRcd's qtparted can format free space on hd to create an extended partition to include logical / and swap partitions for linux. Linux installers can too. Dont make any of these active or bootable. You will put lilo or grub to mbr. SRcd has an ntfs resizer if needed. Read the help available. Look through its boot disks too for rescue/boot floppys or alternative bootmanagers. Good luck.
This was a 100% Linux machine running a bazillion things with no hickups at all till I pulled a fast one with the whole fsck on the mounted partition. Since I didn't keep a copy of my partition table, I rebuilt it using qtparted (didn't know about qpart till I read the link you put up there but since I have a feeling I chose whatever the "automatic partitioning" suggests at the time on install I've recreated those and everything looks good. Now all I get is "Boot Disk Failure" when I reboot the machine. I'm assuming I need to now put in a boot mgr, grub or lilo now and I'll be able to boot? Not sure if I'll get my data back though but I haven't reformatted anything, it should still be there I'm hoping? Do I need a GRUB on a floppy to install it on the MBR or can I do it from the SRCD?
When I setup the system I thought I had put grub on hdc. However it would seem this is not the case. I say this because since I wiped the partition table on hda and then formatted to xfs using qparted, I can’t boot into the system.
I have boot using the 1st CD and using the rescue method and it does mount the system /mnt/sysimage. I am concerned however that the rescue option is not picking up the xfs drive. I say this cause I can’t remember there being a /mnt/sysimage/dev/hda. The concern about the xfs might be incorrect it has to be said.
Your / partition will be mounted at /mnt/sysimage. hda is not being mounted automatically. You wiped out the bootloader in addition to the partition table and the above should work to restore it to hda.
So I played about a bit. Changed the boot order in the bios to start with HDD-1 (/dev/hdc) instead of HDD-0 (/dev/hda) which ws what it was when I first installed this FC4 system. Boot with the FC4 CD and chose linux rescue. Now when I boot the PC, grub comes up and I did the following:
Code:
grub> find /boot/grub/stage1
(hd0,5)
grub> root (hd0,5)
Filesystem type is ext2fs; partition type 0x83
grub> setup (hd0)
Checking if "boot/grub/stage1" exists...yes
Checking if "boot/grub/stage2" exists...yes
Checking if "boot/grub/e2fs_stage1_5" exists...yes
Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...15 sectors are embedded. succeeded
Running "install /boot/grub/stage1 (hd0) (hd0)1+15 p (hd0,5)/boot/grub/stage2 /boot/grub/grub.conf"...succeeded
grub>
Now here's the thing, the vmlinuz-2.6.16-1.2096_FC4 was (is?) on /boot which is on /dev/hdc1. The reason the first is has a ? is because I thought I would install Ubuntu and that when grub was installing it would pick up both Ubuntu and fc4. However something messed up happened there (the screen came up all garbled and none of the options would load). I then tried to reinstall Ubuntu this time formatting the /boot partition. That didn't work either.
However, when I boot form the Ubuntu LiveCD, I can mount /dev/hdc1 and when I ls, this is the output
Code:
root@ubuntu:/mnt# ls -l /mnt/boot
total 14362
-rw-r--r-- 1 root root 764778 Jun 3 2005 System.map-2.6.11-1.1369_FC4
-rw-r--r-- 1 root root 897159 Oct 10 2005 System.map-2.6.12-9-386
-rw-r--r-- 1 root root 786954 Apr 19 19:42 System.map-2.6.16-1.2096_FC4
-rw-r--r-- 1 root root 239770 Oct 10 2005 abi-2.6.12-9-386
-rw-r--r-- 1 root root 56991 Jun 3 2005 config-2.6.11-1.1369_FC4
-rw-r--r-- 1 root root 64135 Oct 10 2005 config-2.6.12-9-386
-rw-r--r-- 1 root root 63455 Apr 19 19:42 config-2.6.16-1.2096_FC4
drwxr-xr-x 2 root root 1024 May 5 23:15 grub
-rw-r--r-- 1 root root 1134352 May 2 18:22 initrd-2.6.11-1.1369_FC4.img
-rw-r--r-- 1 root root 1124075 May 3 05:13 initrd-2.6.16-1.2096_FC4.img
-rw-r--r-- 1 root root 4936748 May 5 19:57 initrd.img-2.6.12-9-386
drwx------ 2 root root 12288 May 2 20:17 lost+found
-rw-r--r-- 1 root root 94664 Jun 30 2005 memtest86+.bin
-rw-r--r-- 1 root root 1639539 Jun 3 2005 vmlinuz-2.6.11-1.1369_FC4
-rw-r--r-- 1 root root 1206555 Oct 10 2005 vmlinuz-2.6.12-9-386
-rw-r--r-- 1 root root 1598436 Apr 19 19:42 vmlinuz-2.6.16-1.2096_FC4
So it seems that the FC4 kernel stuff is still there. I feel I must be quite close to solving the problem.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.