LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Ubuntu Reinstall with same /home partition, all seems lost but still 13gb disk space (https://www.linuxquestions.org/questions/linux-software-2/ubuntu-reinstall-with-same-home-partition-all-seems-lost-but-still-13gb-disk-space-898097/)

TwoGuesses 08-18-2011 11:31 AM

Ubuntu Reinstall with same /home partition, all seems lost but still 13gb disk space
 
Soo, I encountered a problem with Ubuntu 11.04 with Unity where the dock and the bar that runs along the top wouldn't come up with the rest of the desktop (I'd get wallpaper and an icon, but nothing else) SO I switched to a root session, and after only a few commands would work because apparently "/usr/bin/python" was missing (Or similar -- that may not be exactly what it said, but it was definitely a problem with python because sudo and various other commands wouldn't work. I figured a reinstall would solve the problem, and I had all of my important stuff on a separate /home partition. However, after the install, Ubuntu mounts the appropriate partition at /home, there's nothing there but the standard skeleton of directories. I payed special attention during the install to be sure it didn't format the partition, and gparted is saying that my 13gb of the partition is still used, so I'm quite sure it's still there.. Any suggestions are greatly appreciated..
I probably should of come here for the initial problem...

jdkaye 08-18-2011 11:48 AM

Have you tried a liveCD to see if you could mount your home partition from there? knoppix is a good choice.
ciao,
jdk

TwoGuesses 08-18-2011 06:27 PM

I used a live cd and got the same thing Ubuntu says.

TobiSGD 08-18-2011 06:32 PM

Please post the output of
Code:

sudo fdisk -l
df -h
mount


TwoGuesses 08-18-2011 07:05 PM

fdisk -l output:

Quote:

Disk /dev/sda: 30.0 GB, 30020272128 bytes
255 heads, 63 sectors/track, 3649 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00060fb0

Device Boot Start End Blocks Id System

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xfd6d7da1

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 66 524288 83 Linux
Partition 1 does not end on cylinder boundary.
/dev/sdb2 66 14035 112202753 5 Extended
/dev/sdb3 14035 14296 2097152 83 Linux
/dev/sdb4 14296 121602 861935616 83 Linux
/dev/sdb5 66 2677 20971520 83 Linux
/dev/sdb6 2677 5288 20971520 83 Linux
/dev/sdb7 5288 6593 10485760 83 Linux
/dev/sdb8 6593 7246 5242880 83 Linux
/dev/sdb9 7246 13773 52428800 83 Linux
/dev/sdb10 13774 14035 2097152 82 Linux swap / Solaris

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x000680bd

Device Boot Start End Blocks Id System
/dev/sdc1 * 1 6225 49998848 83 Linux
Note: Two SATA 1tb drives, one IDE 30 gb drive(which is presently empty). I experimented with LFS, hence all of the small partitions on sdb

df -h:

Quote:

Filesystem Size Used Avail Use% Mounted on
/dev/sdc1 47G 3.7G 41G 9% /
none 1.9G 708K 1.9G 1% /dev
none 2.0G 1.3M 2.0G 1% /dev/shm
none 2.0G 132K 2.0G 1% /var/run
none 2.0G 0 2.0G 0% /var/lock
/dev/sdb4 810G 739M 768G 1% /home
... Yes, the /home partition is that large.... :P

Quote:

/dev/sdc1 on / type ext4 (rw,errors=remount-ro,commit=0)
proc on /proc type proc (rw,noexec,nosuid,nodev)
none on /sys type sysfs (rw,noexec,nosuid,nodev)
fusectl on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
none on /dev type devtmpfs (rw,mode=0755)
none on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
none on /dev/shm type tmpfs (rw,nosuid,nodev)
none on /var/run type tmpfs (rw,nosuid,mode=0755)
none on /var/lock type tmpfs (rw,noexec,nosuid,nodev)
/dev/sdb4 on /home type ext4 (rw,commit=0)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,noexec,nosuid,nodev)
gvfs-fuse-daemon on /home/user/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=user)
Thanks in advance for the help and time.

TobiSGD 08-18-2011 07:34 PM

According to df your /home partition only contains 739MB, not 13GB. So it seems to me that this partition actually was formatted. So you have two options to get your data back:
1. Restore your backup (assuming you have one, if the data is important to you).
2. Unmount the /home partition immediately and use photorec (part of the testdisk package) to recover at least a part of your data.

TwoGuesses 08-18-2011 07:45 PM

1 Attachment(s)
I noticed that it said only 739M was used. I also noticed that it said it was a total of 810GB with only 768G available.. Meaning that 42gb is used...?
Also, I attached a screenshot of Gparted's claim that there is 13g used. Would this be inaccurate?

TobiSGD 08-18-2011 07:51 PM

I would recommend to not run the system anymore with the /home partition mounted, every write to that partition can destroy more of your data.
Quote:

I also noticed that it said it was a total of 810GB with only 768G available.. Meaning that 42gb is used...?
On a normal format without specifying any further options 5% of the space are reserved for the root user. That is the used space you can see there. On a data-only partition (like the /home partition) this doesn't make much sense, you can adjust that with the -m option of tune2fs. But recover your data first.

I don't know how GParted comes to that 13GB.

syg00 08-18-2011 10:31 PM

A couple of (hopefully educated) guesses:
- the partition is ~822 GiB (as both gparted and fdisk indicate).
- the journal occupies ~12-13 Gib - giving a usable filesystem size of ~810 GiB (as df says)
- default 5% is reserved as TobiSGD suggest - say 40.5 GiB.

Seems to be in the ballpark; doesn't allow for any data though ...
Start looking at testdisk and/or photorec.

Now, about that backup you took before you started all this ???.

TwoGuesses 08-19-2011 10:29 AM

Alright, I'll take a peak into photorec...
Thanks for the help, I removed /dev/sdb4 from fstab and am going to use photorec as root.

Thanks for the specification.
Oh, you mean that nonexistent one...? :P *lesson learned..*


All times are GMT -5. The time now is 05:21 PM.