I ran into troubles on my Dell box, which hosting Fedora(18.104.22.168-1.fc15.i686 ) and WinXP Dual OS.
My OS partition table looks like the following(After recovery)
[root@suse suse]# uname -a
Linux suse.rac 22.214.171.124-1.fc15.i686 #1 SMP Fri Nov 11 21:50:36 UTC 2011 i686 i686 i386 GNU/Linux
[root@suse suse]# df -h
Filesystem Size Used Avail Use% Mounted on
rootfs 144G 15G 128G 11% /
/dev/sda8 97G 55G 38G 60% /usr/suse
/dev/sda3 21G 7.1G 14G 35% /media/win2
/dev/sda1 24G 18G 5.7G 76% /media/win1
/dev/sda5 291M 173M 104M 63% /boot
/dev/sda6 145G 121G 17G 88% /home/suse
/dev/sda7 144G 15G 128G 11% /tmp
/dev/sda7 144G 15G 128G 11% /var/tmp
/dev/sda7 144G 15G 128G 11% /home
Actually I dont especially partition for /home or /tmp, it’s directed to the root partition.
***I think it a not smart design in Fedora using /etc/mtab
***Which may cause duplicated mount.
***If you dont like it ,just change mtab solution.
[Please Dont Copy following Steps, danger! ]
1. umount /dev/sda7
It’s good that /home umounted.
2. re-run the cmd1 , umount several times. with option ‘-l’, which may dismount root partition.
3. os in bad state although running applications keep working, but
is no visible now.
4. fdisk or df not work.
5. reboot and try above codes…and finally…. system down.
[Time to Rescue]
1. reboot nodes doesn’t work, grub seems ok .
/boot is not affected, but cannot boot, incidentally turn to debug dracut shell.
2. use cmd
e2fsck seems not have obvious problems.
mount all my Linux partitions one-by-one, found the problem that my root partition lost.
3. seems I find the root cause that partition table is not in good condition.
cannot find /root.
But all other partitions are work fine.
4. After a while I decide to continue.
I’ve a iso image of “Fedora-15-i686-Live-XFCE.iso” on my Windows partition.
It’s prepared for the first installation from iso.
5. so use this iso for a live linux rescue env.
editing the grub command
(my /boot is not affected, so grub still works, even if it fail, I have grub4dos ready. )
kernel /LiveOS/vmlinuz0 root=live:/dev/sda5 ro liveimg rhgb rootfstype=auto
6. boot the LiveCD, mount the disk partitions and check. seems all ok except the root partition.
TestDisk is a well-known free tool that can help repair the partition table and find the lost partitions…..
It’s however fine my LiveOS can connect internet and download TestDisk binary….
Use TestDisk Analyze to find the partition table, write back to Disk…
<Caution: the write back operation is not safe, backup current table if necessary>
7. reboot OS but ‘m still blocked on GRUB page, so I had to turned back to LiveOS as in step5
8. from my notes, noticed that the disk sequence has already changed…
for example, the /dev/sda5 windows partition is now marked as /dev/sda3
/boot which was /dev/sda8 is now /dev/sda5
need to change following files, replace the changed disk id:
for example change (hd0,8)->(hd0,4) on my env. for /boot
change /dev/sda05 mount point in fstab to /dev/sda03
those records in fstab using UUID is not necessary. if the uuid of disk partition is not changed.
blkid to verify>
9. since the boot partition id changed and last reboot blocked on the grub page.
need to re-install grub
[root@localhost liveuser]# grub
Probing devices to guess BIOS drives. This may take a long time.
GNU GRUB version 0.97-71.fc15 (640K lower / 3072K upper memory)
[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename.]
grub> root (hd0,4)
Filesystem type is ext2fs, partition type 0x83
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "/grub/e2fs_stage1_5" exists... yes
Running "embed /grub/e2fs_stage1_5 (hd0)"... 26 sectors are embedded.
Running "install /grub/stage1 (hd0) (hd0)1+26 p (hd0,4)/grub/stage2 /grub/grub.conf"... succeeded
10. reboot and OS can correctly restart… all partitions found.
using e2fsck to check and verify.
Fri Dec 9 10:36:22 CST 2011
Another issue after the partition table recover.
My Oracle DB cannot startup
ORA-00845: MEMORY_TARGET not supported on this system
Process PMON died, see its trace file
USER (ospid: 8872): terminating the instance due to error 443
Instance terminated by USER, pid = 8872
Fri Dec 09 10:31:57 2011
Starting ORACLE instance (normal)
WARNING: You are trying to use the MEMORY_TARGET feature.
This feature requires the /dev/shm file system to be mounted for at least 843055104 bytes.
/dev/shm is either not mounted or is mounted with available space less than this size.
Please fix this so that MEMORY_TARGET can work as expected.
Current available is 755195904 and used is 296345600 bytes.
Ensure that the mount point is /dev/shm for this directory.
memory_target needs larger /dev/shm
so, umount all bind mount point on tmpfs, and remount with a larger size.
# mount -o remount,size=2G /dev/shm