Disk Partition damaged - how can I rescue damaged partition
Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
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.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Disk Partition damaged - how can I rescue damaged partition
I had Ubuntu 12.10 running on a single disk partition for two years. I decided to add two new partitions for other Linux distros (Kubuntu 14.04 )
Decided to install Kubuntu 14.04 on a separate partition as a dual boot.
Partitioned disk , using Parted, with
Code:
/dev/sda1 200GB
Code:
/dev/sda3 200GB
/dev/sda5 560GB
intended one partition as spare,
--
After Kubuntu14.04 installed Ubuntu12.10 has disappeared. Kubuntu14 is booting , but with some strange effects ( the GUI is seeing some partitions but these are not in /etc/fstab )
My original Ubuntu12.10 looked to have disappeared completely.
What parted shows is that Kubuntu 14 has shoved the installation into a brand new partition /dev/sda6 ( which I did not define and certainly not the one I chose ). And worse, the Ubuntu12.10 installation has had its partition clobbered ( it was an ext4 partition - now undefined ).
I suspect that GRUB and or MBR on /dev/sda1 has been hammered.
I suspect that I can re-install GRUB and MBR or /dev/sda1 but has anyone done exactly that before?
And any suggestion on rescuing the original 12.10 installation would be helpful.
To post some information we can use, boot into the Kubuntu install and run the following commands from a terminal:
df -h
sudo parted -l (Lower Case Letter L in the command)
This should give some info that can be used to get help. Also, which installation type option did you select, was it 'Something Else' or a 'Manual" option? If you wanted Kubuntu on sda3 I expect you would have needed to do the Manual option so you could tell it to install there. You do know that Ubuntu 12.10 has not been supported since May of this year, no updates no software through the standard methods.
I already have that info, captured with screenshot, but I cannot see a way, on this forum,to upload an image - the menu only requests an image from a URL.
It was a standard install with Kubuntu, it gave an option to choose a partition, and then it ignored that choice, and created a completely new partition. (And note it also re-assigned swap to a new partition as well)
Last edited by ray98; 10-22-2014 at 08:44 AM.
Reason: Add Parted snapshot
The /dev/sda1 filesystem type is "unknown" as given by gparted.
When I run the mount command I get the following error ( seems to be because the /dev/sda1 has no filesystem type assigned )
euclid@euclid:~$ sudo mount -t ext4 -o ro,noload /dev/sda1 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sda1,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so
I am not sure the effect of forcing the filesystem type and / or trying to re-install grub?
Any suggestions welcome.
Thanks
Also ran fsck, with following results
euclid@euclid:~$ sudo fsck /dev/sda1
fsck from util-linux 2.20.1
e2fsck 1.42.9 (4-Feb-2014)
ext2fs_open2: Bad magic number in super-block
fsck.ext2: Superblock invalid, trying backup blocks...
fsck.ext2: Bad magic number in super-block while trying to open /dev/sda1
The superblock could not be read or does not describe a valid ext2/ext3/ext4
filesystem. If the device is valid and it really contains an ext2/ext3/ext4
filesystem (and not swap or ufs or something else), then the superblock
is corrupt, and you might try running e2fsck with an alternate superblock:
e2fsck -b 8193 <device>
or
e2fsck -b 32768 <device>
SUMMARY
It looks as if parted moved the start of /dev/sda1 by a few megabytes,
What would the effect be if I simply changed this start back to 0?
Last edited by ray98; 10-24-2014 at 07:28 AM.
Reason: show fsck output
I tried getting a backup of the magic number , but, it says alignment is off by 3584 bytes:
euclid@euclid:~$ sudo mke2fs -n /dev/sda1
mke2fs 1.42.9 (4-Feb-2014)
/dev/sda1 alignment is offset by 3584 bytes.
This may result in very poor performance, (re)-partitioning suggested.
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
12804096 inodes, 51201163 blocks
2560058 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=0
1563 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks:
32768, 98304, 163840, 229376, 294912, 819200, 884736, 1605632, 2654208,
4096000, 7962624, 11239424, 20480000, 23887872
Any advice on how I can proceed with rescuing this filesystem is welcome
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.