LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This 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


Reply
  Search this Thread
Old 10-22-2014, 07:46 AM   #1
ray98
LQ Newbie
 
Registered: Oct 2014
Posts: 5

Rep: Reputation: Disabled
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.

Thanks
 
Old 10-22-2014, 08:06 AM   #2
yancek
LQ Guru
 
Registered: Apr 2008
Distribution: Slackware, Ubuntu, PCLinux,
Posts: 10,504

Rep: Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490Reputation: 2490
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.
 
Old 10-22-2014, 08:27 AM   #3
ray98
LQ Newbie
 
Registered: Oct 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
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)
Attached Thumbnails
Click image for larger version

Name:	snapshot-of-parted.png
Views:	30
Size:	103.7 KB
ID:	16718  

Last edited by ray98; 10-22-2014 at 08:44 AM. Reason: Add Parted snapshot
 
Old 10-23-2014, 02:31 AM   #4
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by ray98 View Post
I already have that info
why don't you just copy-paste the text?
 
Old 10-23-2014, 05:48 AM   #5
ray98
LQ Newbie
 
Registered: Oct 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
I posted a screenshot yesterday showing that information.


euclid@euclid:~$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda6 262G 6.5G 242G 3% /
none 4.0K 0 4.0K 0% /sys/fs/cgroup
udev 2.0G 4.0K 2.0G 1% /dev
tmpfs 400M 1.1M 399M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 2.0G 332K 2.0G 1% /run/shm
none 100M 20K 100M 1% /run/user
/dev/sdb 3.7G 2.2G 1.6G 59% /media/euclid/SANSA CLIPP
euclid@euclid:~$
euclid@euclid:~$ sudo parted -l
[sudo] password for euclid:
Model: ATA ST1000DM003-9YN1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: msdos

Number Start End Size Type File system Flags
1 8225kB 210GB 210GB primary boot
3 210GB 419GB 210GB primary ext4
4 419GB 711GB 292GB primary ext4
2 711GB 1000GB 289GB extended
6 711GB 996GB 285GB logical ext4
5 996GB 1000GB 4243MB logical linux-swap(v1)


Model: SanDisk Sansa Clip+ 4GB (scsi)
Disk /dev/sdb: 3934MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 3934MB 3934MB fat32


euclid@euclid:~$

Last edited by ray98; 10-23-2014 at 05:51 AM.
 
Old 10-23-2014, 11:32 AM   #6
bimboleum
Member
 
Registered: Oct 2009
Posts: 111

Rep: Reputation: 23
Hi,
Have you tried:-

mount -t ext4 -o ro /dev/sda1 /mnt

If this succeeds, you can at least look and check things are as they should be.

cheers
pete

pete hilton
saruman@ruvolo-hilton.org
 
Old 10-24-2014, 07:09 AM   #7
ray98
LQ Newbie
 
Registered: Oct 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
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

euclid@euclid:~$
euclid@euclid:~$
euclid@euclid:~$ dmesg | tail

[10476.245798] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[10476.246035] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[10476.246162] EXT4-fs (sda1): VFS: Can't find ext4 filesystem
[10476.246284] FAT-fs (sda1): invalid media value (0x00)
[10476.246286] FAT-fs (sda1): Can't find a valid FAT filesystem
[10628.650106] EXT4-fs (sda1): VFS: Can't find ext4 filesystem


---

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
 
Old 10-24-2014, 08:05 AM   #8
ray98
LQ Newbie
 
Registered: Oct 2014
Posts: 5

Original Poster
Rep: Reputation: Disabled
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

Thanks
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Recovering deleted files from vfat partition on damaged disk kresho Linux - Hardware 2 10-31-2008 03:06 AM
Help recovering damaged partition matheusleite Linux - Newbie 1 10-10-2007 12:48 PM
Rescue a damaged partition Timer Linux - General 4 10-07-2005 03:54 PM
Damaged ext3 partition drigz Linux - Hardware 1 07-03-2004 12:09 PM
Damaged partition after installation ratavaz Mandriva 1 03-22-2004 04:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:41 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration