Results 1 to 5 of 5
So I had a partition table similar to : (fdisk -l):
Code:
Device Boot Start End Blocks Id System
/dev/hdb1 1 6080 48837568+ c W95 FAT32 (LBA)
/dev/hdb3 6081 27263 ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 06-15-2009 #1
Partition Mangle
So I had a partition table similar to : (fdisk -l):
... don' t quote me on the hdb3 line, as I'm guessingCode:Device Boot Start End Blocks Id System /dev/hdb1 1 6080 48837568+ c W95 FAT32 (LBA) /dev/hdb3 6081 27263 ????? 83 Linux /dev/hdb6 10000 13889 31246393+ 83 Linux /dev/hdb7 13890 15105 9767488+ 83 Linux /dev/hdb8 15106 22400 58597056 83 Linux
I wanted to delete the /dev/hdb3 (primary) partition and insert a logical ext3 in it's place. Which I would 'cp -a' my /home folder to, because /dev/hda was 100% full. I did all that and copied my home folder over, which seemed to work.
The 'fdisk -l' table looks like this now:
.../dev/hdb9 is a backup I made of hdb5 with dd .Code:Disk /dev/hdb: 250.0 GB, 250059350016 bytes 255 heads, 63 sectors/track, 30401 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x000124f6 Device Boot Start End Blocks Id System /dev/hdb1 1 6080 48837568+ c W95 FAT32 (LBA) /dev/hdb3 6081 27263 170152447+ 5 Extended /dev/hdb5 6081 9999 31479336 83 Linux /dev/hdb6 10000 13889 31246393+ 83 Linux /dev/hdb7 13890 15105 9767488+ 83 Linux /dev/hdb8 15106 22400 58597056 83 Linux /dev/hdb9 22401 27263 39062016 83 Linux
After reboot (i didn't reboot after making partition or formating), the system says:
and when I try to mount /dev/hdb3:Code:mount: wrong fs type, bad option, bad superblock on /dev/hdb5, missing codepage or helper program, or other error In some cases useful info is found in syslog - try dmesg | tail or so
It also gives me something about running e2fsck -b 8193 device , which I tried, substituting -b 32768 . Nothing would recognize the partition. Finally I landed on the testdisk program, which found it!Code:mount: wrong fs type, bad option, bad superblock on /dev/hdb3, missing codepage or helper program, or other error (aren't you trying to mount an extended partition, instead of some logical partition inside?) In some cases useful info is found in syslog - try dmesg | tail or so
TestDisk ouput:
and the next screen:Code:Disk /dev/hdb - 250 GB / 232 GiB - CHS 30401 255 63 Current partition structure: Partition Start End Size in sectors 1 P FAT32 LBA 0 1 1 6079 254 63 97675137 3 E extended 6080 0 1 27262 254 63 340304895 No partition is bootable No EXT2, JFS, Reiser, cramfs or XFS marker 5 L Linux 6080 1 1 9998 254 63 62958672 5 L Linux 6080 1 1 9998 254 63 62958672 X extended 9999 0 1 13888 254 63 62492850 6 L Linux 9999 1 1 13888 254 63 62492787 X extended 13889 0 1 15104 254 63 19535040 7 L Linux 13889 1 1 15104 254 63 19534977 X extended 15105 0 1 22399 254 63 117194175 8 L Linux 15105 1 1 22399 254 63 117194112 X extended 22400 0 1 27262 254 63 78124095 Next *=Primary bootable P=Primary L=Logical E=Extended D=Deleted
Code:Disk /dev/hdb - 250 GB / 232 GiB - CHS 30401 255 63 Partition Start End Size in sectors * FAT32 LBA 0 1 1 6079 254 63 97675137 P Linux 6080 0 1 9998 254 63 62958735 [/] L Linux 9999 1 1 13888 254 63 62492787 <---- that's the one I need! L Linux 13889 1 1 15104 254 63 19534977 L Linux 15105 1 1 22399 254 63 117194112
I'm really having trouble making heads or tails of all this. I think I violated some rule by trying to insert a logical partition.
Like I said, it all actually worked before I rebooted.
- 06-15-2009 #2Linux User
- Join Date
- May 2009
- Location
- Big River, Sask, Canada
- Posts
- 342
I have LVM on both drives.
Here is my internal sda and external sdb partition table
Device Boot Start End Blocks Id System
/dev/sda1 1 2490 20000893+ 83 Linux
/dev/sda2 * 2491 2988 4000185 83 Linux
/dev/sda3 2989 3112 996030 82 Linux swap / Solaris
/dev/sda4 3113 30401 219198892+ 5 Extended
/dev/sda5 3113 5602 20000893+ 83 Linux
/dev/sda6 5603 8092 20000893+ 83 Linux
/dev/sda7 8093 29529 172192671 83 Linux
/dev/sda8 29530 30401 7004308+ 83 Linux
Disk /dev/sdb: 120.0 GB, 120034123776 bytesDev sda1 is bootable for AntiX Dev sda2 is bootable for Ubuntu 8.04. Dev sda8 is bootable for Mepis
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x711b711b
Device Boot Start End Blocks Id System
/dev/sdb1 2337 4946 20964825 83 Linux
/dev/sdb2 4947 5077 1052257+ 82 Linux swap / Solaris
/dev/sdb3 1 2336 18755887+ 83 Linux
/dev/sdb4 5078 14593 76437270 5 Extended
/dev/sdb5 5078 6382 10482381 83 Linux
/dev/sdb6 6383 7687 10482381 83 Linux
/dev/sdb7 7688 14593 55472413+ 83 Linux
Partition table entries are not in disk order
dev sdb1 is unbootable for SUSE data backup from old install, Dev sdb3 is bootable for Ubuntu 9.04Registered Linux User #420832
- 06-15-2009 #3Linux User
- Join Date
- May 2009
- Location
- Big River, Sask, Canada
- Posts
- 342
Here is /boot/grub/message for sda
gfxmenu /boot/grub/message
title MEPIS at sda1, newest kernel
root (hd0,0)
kernel /boot/vmlinuz root=/dev/sda1 nomce quiet splash vga=791
initrd /boot/initrd.img
boot
title MEPIS at sda1, previous kernel (if any)
root (hd0,0)
kernel /boot/vmlinuz.old root=/dev/sda1 nomce quiet splash vga=791
boot
title MEPIS at sda1, kernel 2.6.27-1-mepis-smp
root (hd0,0)
kernel /boot/vmlinuz-2.6.27-1-mepis-smp root=/dev/sda1 nomce quiet splash vga=791
initrd /boot/initrd.img-2.6.27-1-mepis-smp
boot
title Ubuntu 8.04.2, kernel 2.6.24-24-generic
root (hd0,1)
kernel /boot/vmlinuz-2.6.24-24-generic root=UUID=de57233b-b6d5-42bc-b61b-0c1584f6a131 ro quiet splash
initrd /boot/initrd.img-2.6.24-24-generic
title MEPIS at sda8, newest kernel
root (hd0,7)
kernel /boot/vmlinuz root=/dev/sda8 nomce quiet splash vga=791
initrd /boot/initrd.img
title MEMTEST
kernel /boot/memtest86+.binRegistered Linux User #420832
- 06-15-2009 #4Linux User
- Join Date
- May 2009
- Location
- Big River, Sask, Canada
- Posts
- 342
Here is /boot/grub/menu.lst from sdb
title Ubuntu 9.04, memtest86+title Ubuntu 9.04, kernel 2.6.28-11-generic
uuid 788a4901-70db-4fd3-a08a-1e25c1a492b2
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=788a4901-70db-4fd3-a08a-1e25c1a492b2 ro quiet splash
initrd /boot/initrd.img-2.6.28-11-generic
quiet
title Ubuntu 9.04, kernel 2.6.28-11-generic (recovery mode)
uuid 788a4901-70db-4fd3-a08a-1e25c1a492b2
kernel /boot/vmlinuz-2.6.28-11-generic root=UUID=788a4901-70db-4fd3-a08a-1e25c1a492b2 ro single
initrd /boot/initrd.img-2.6.28-11-generic
uuid 788a4901-70db-4fd3-a08a-1e25c1a492b2
kernel /boot/memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST
EDIT~ not sure why I see option for sdb on boot, because there is no reference to it in /sda1/boot/grub/menu.lstRegistered Linux User #420832
- 06-16-2009 #5
got it
Well, I guess inserting that logical partition bumped all the hdb numbers up one.
So I just mounted /dev/hdb6 and there was hdb5's files!
I don't know what happened to the Ubuntu partition (the original hdb5) I had in there, must have been overwritten or something. It didn't matter anyway.
As far as the person who hijacked my thread is concerned: I wouldn't suggest using LVM unless you really, really need it. I tried a long while back and it turned into more of a nightmare than my current situation.
If you run out (or want to expand) space on a partition, try to just create an entirely new (larger) partition and move the files & directories to it (with: cp -a). You can then mount that partition in place of the old directory. That's exactly what I was doing with my "/home" directory above. I just should have been more careful with the actual partitioning.
LVM, to me, is just a worst-case scenario. I only use it as a last resort.


Reply With Quote
