LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (http://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Lost fedora partition when installing ubuntu? (http://www.linuxquestions.org/questions/linux-newbie-8/lost-fedora-partition-when-installing-ubuntu-935732/)

$u$hil_k$ 03-21-2012 01:47 PM

Lost fedora partition when installing ubuntu?
 
guys basically my problem is i had a 250Gb hard disk(without partion) installed with Fedora12 today i installed ubuntu by partioning my hard disk by 5gb for / and 299 mb for swap in ubuntu and i made rest partion as do not format...Now, the thing is am not able to view my old data which is of 240 GB....if i open the file system in Ubuntu its showing only the 5Gb filesystem but how to view my fedora12 data which i didnt format :(

repo 03-21-2012 01:50 PM

Seems to me you need to mount the partition.

Kind regards

T3RM1NVT0R 03-21-2012 01:58 PM

@ Reply
 
Hi $u$hil_k$,

Welcome to LQ!!!

If I am getting it correctly you had a 250 GB hdd on which you had Fedora installed. That was installed on a single partition which I can take as default partition scheme you have selected during install. Is that correct? If that is the case the default layout would have been:

Quote:

/dev/sda1 /
/dev/sda2 swap
or something similar.

Thing that I would like to know is how did you create the partition this time? If /dev/sda1 was in use by / then how can you leave it aside while partitioning?

Can you explain in detail the partition layout that you had earlier and the way you created partition this time.

$u$hil_k$ 03-21-2012 02:23 PM

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00062891

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 9764863 4881408 83 Linux
/dev/sda2 9766910 488394751 239313921 5 Extended
/dev/sda5 9766912 10348543 290816 82 Linux swap / Solaris
/dev/sda6 10350592 488394751 239022080 83 Linux

Disk /dev/mapper/cryptswap1: 297 MB, 297795584 bytes
255 heads, 63 sectors/track, 36 cylinders, total 581632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x723fd529

Disk /dev/mapper/cryptswap1 doesn't contain a valid partition table


this is how it looks can u please tell me how to mount the file system?

T3RM1NVT0R 03-21-2012 02:34 PM

@ Reply
 
Paste the output of the following commands:

1.
Code:

sudo df -h
2.
Code:

sudo cat /etc/fstab
3.
Code:

parted -l /dev/sda

WarTurkey 03-21-2012 02:36 PM

Did you try to mount sda6? That looks like that might be the one. Open a Terminal in Ubuntu and type:
Code:

sudo -s
mkdir /mnt/fedora
mount -t ext2 /dev/sda6 /mnt/fedora

Then you should be able to access the partition from the Filesystem in Ubuntu, as long as it's an ext2 partition. Otherwise, try ext3/ext4.

Tinkster 03-21-2012 02:40 PM

Quote:

Originally Posted by WarTurkey (Post 4632858)
Did you try to mount sda6? That looks like that might be the one. Open a Terminal in Ubuntu and type:
Code:

sudo -s
mkdir /mnt/fedora
mount -t ext2 /dev/sda6 /mnt/fedora

Then you should be able to access the partition from the Filesystem in Ubuntu, as long as it's an ext2 partition. Otherwise, try ext3/ext4.

Or just omit the -t flag ... w/ Linux file-systems mount is pretty good with
guessing what it's dealing with.




P.S.: Sushil, I took the liberty to rename your thread; the title you chose
was pretty pointless.

$u$hil_k$ 03-21-2012 02:40 PM

sudo df -h

Filesystem Size Used Avail Use% Mounted on
/dev/sda1 4.6G 4.0G 422M 91% /
udev 1.9G 4.0K 1.9G 1% /dev
tmpfs 791M 820K 790M 1% /run
none 5.0M 0 5.0M 0% /run/lock
none 2.0G 132K 2.0G 1% /run/shm
/home/sushilks/.Private 4.6G 4.0G 422M 91% /home/sushilks
/dev/sr0 4.2G 4.2G 0 100% /media/20120114_1237

----------------------------------------------------------------------------

sudo cat /etc/fstab

# /etc/fstab: static file system information.
#
# Use 'blkid' to print the universally unique identifier for a
# device; this may be used with UUID= as a more robust way to name devices
# that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=be17b9d2-0396-40bd-ad20-5240d45da75c / ext3 errors=remount-ro 0 1
# swap was on /dev/sda5 during installation
#UUID=e3174672-1218-46c6-9ed8-df1b6875c71f none swap sw 0 0
/dev/fd0 /media/floppy0 auto rw,user,noauto,exec,utf8 0 0
/dev/mapper/cryptswap1 none swap sw 0 0


-----------------------------------------------------------------------------------------------------

parted -l /dev/sda


/dev/mapper/control: open failed: Permission denied
Failure to communicate with kernel device-mapper driver.
Warning: Unable to open /dev/sr0 read-write (Read-only file system). /dev/sr0
has been opened read-only.
Error: /dev/sr0: unrecognised disk label

T3RM1NVT0R 03-21-2012 02:51 PM

@ Reply
 
After looking at the output it appears that the partition that we are looking for is /dev/sda6. You can mount it using:

Code:

sudo mount /dev/sda6 /media
You can create a separate folder as suggested by WarTurkey or you can using either /mnt or /media (as mentioned above)

And I forgot to mention that for parted -l /dev/sda you have to use sudo. So basically it will look like:

Code:

sudo parted -l /dev/sda
But we have the information we were looking for. Try mounting the partition /dev/sda6 and see if that works.

$u$hil_k$ 03-21-2012 02:54 PM

Quote:

Originally Posted by WarTurkey (Post 4632858)
Did you try to mount sda6? That looks like that might be the one. Open a Terminal in Ubuntu and type:
Code:

sudo -s
mkdir /mnt/fedora
mount -t ext2 /dev/sda6 /mnt/fedora

Then you should be able to access the partition from the Filesystem in Ubuntu, as long as it's an ext2 partition. Otherwise, try ext3/ext4.

the partion type is Linux(0x83)

T3RM1NVT0R 03-21-2012 03:00 PM

@ Reply
 
0x83 is a code for Linux type partition. That does not tell you anything about the filesystem format. You can find out the filesystem format using parted:

Code:

sudo parted -l /dev/sda

$u$hil_k$ 03-21-2012 03:04 PM

Quote:

Originally Posted by T3RM1NVT0R (Post 4632890)
0x83 is a code for Linux type partition. That does not tell you anything about the filesystem format. You can find out the filesystem format using parted:

Code:

sudo parted -l /dev/sda



Model: ATA ST3250318AS (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number Start End Size Type File system Flags
1 1049kB 5000MB 4999MB primary ext3 boot
2 5001MB 250GB 245GB extended
5 5001MB 5298MB 298MB logical
6 5300MB 250GB 245GB logical


Model: Linux device-mapper (crypt) (dm)
Disk /dev/mapper/cryptswap1: 298MB
Sector size (logical/physical): 512B/512B
Partition Table: loop

Number Start End Size File system Flags
1 0.00B 298MB 298MB linux-swap(v1)


THIS IS WHAT IT LOOKS.....AND IF I SEE IT IN GPART ITS SHOWING UNKNOWING IS THERE ANY WAY I CAN MOUNT IN GPART

Tinkster 03-21-2012 03:08 PM

This suggests that what Ubuntu did was repartition your drive, and leave the
last partition w/o a file-system. In other words your Fedora system is no
more, neither is your data...

ukiuki 03-24-2012 04:59 AM

Now if you want to recover your data you could use DD, that also will increase your skills quite a bit. There is a lot to learn from that!

Regards

WarTurkey 03-30-2012 09:05 AM

DD will only enable you to get the data off the hard drive. If the data is *CRUCIAL* to obtain, then I recommend "photorec" and/or "testdisk." Testdisk restores lost partitions (however, if the first 5GB have been overwritten, then the partition will probably be lost), while PhotoRec doesn't even use the filesystem, and searches for fragments of files on the hard drive and attempts to piece them together. Once it finishes, you'll have a whole bunch of file fragments that you're going to have to go through on your own, though.


All times are GMT -5. The time now is 04:14 AM.