LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How come I formatted my entire hard drive (2 partitions) with ubuntu live cd (https://www.linuxquestions.org/questions/linux-newbie-8/how-come-i-formatted-my-entire-hard-drive-2-partitions-with-ubuntu-live-cd-633726/)

khanelias 04-07-2008 03:14 PM

How come I formatted my entire hard drive (2 partitions) with ubuntu live cd
 
I used this tutorial to try and put ubuntu gutsy on my flashdrive:
http://www.pendrivelinux.com/2007/09...ibbon-install/

what i actually did was i partitioned and formatted my usb (i thought) and then moved to my student room where i have plug in internet because i couldn't get wireless going. (driver problems i think because the blue light won't go on when i turn the switch on) When i arrived at my room i started up and it said the hard disk wasn't a bootable disk...
I opened ubuntu from live cd and couldn't find the disk any more. it was just gone. with a copied vista cd i managed to see that everything was gone. 150GB of free space.... :(
anyone know if i was actually formatting my hard drive instead of my usb stick maybe? and anyone know if it's still possible to recover any of my lost data? (even windows is gone, no recovery cd's either :()

thanks

pixellany 04-07-2008 03:26 PM

I don't know if we can reconstruct what you did. During installation (of anything), there are a series of steps where you have to make decisions--eg which drive to use, how many partitions, to make, etc.

First, if there is any important data at stake, do not do anything that would write to the harddrive.

To see the current situation, boot up from the live CD and run "sudo fdisk -l". Post the results here. Also, try to reconstruct what steps you took and what choices you made.

khanelias 04-07-2008 03:54 PM

ubuntu@ubuntu:~$ sudo fdisk -l

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x709f709f

Device Boot Start End Blocks Id System
/dev/sda1 * 1 18735 150488856 7 HPFS/NTFS
/dev/sda2 18736 19457 5799465 7 HPFS/NTFS

Disk /dev/sdb: 8213 MB, 8213305856 bytes
255 heads, 63 sectors/track, 998 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x0371c64c

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 92 738958+ 6 FAT16
/dev/sdb2 93 998 7277445 83 Linux



regarding the choices i made, that will be difficult since i tried to follow the tutorial as good as i could... http://www.pendrivelinux.com/2007/09...ibbon-install/

also i just realized that i now have 2 partitions on my usb of which one is called casper-rw, which is 6,5GB of free space, but i can't save anything to and i cannot read the folder called lost&found or something. and the other partition only has 45MB of free space ...

pixellany 04-07-2008 10:51 PM

It seems that the 160GB (sda) is your harddrive and that the 8GB (sdb) is the pen drive. It seems that windows is intact on sda1 and sda2, and that Linux is on sdb2. Not sure about sdb1.

The way you describe the usb drive, it is not appearing here---presumably because it was not mounted when you did fdisk -l.

If you have important data on the Windows partitions, then the first thing to do is get Windows working again. This requires some kind of bootable CD (eg a Windows install or rescue Cd or some third party utility disk) which you then use to restore the Windows bootloader.
If you have no access to a Windows CD, then search on Google using something like "restore MBR".

Once you get Windows working, backup your data. Then go back and install Linux.

syg00 04-07-2008 11:25 PM

Erk ...
Looks like you made the partitions o.k., but maybe you hit the wrong partitions with the mkfs. Try this from the liveCD
Code:

sudo file -sL /dev/sda1
sudo file -sL /dev/sda2


khanelias 04-08-2008 11:22 AM

You really think windows is still intact? because it showed an even amount of free space as total space when i used a windows cd... it couldn't install though, don't know why, it was a copied version, maybe that was it... don't know.

and what exactly will this command file -sL do? because i've become a little wary of the terminal :)

(btw you can call me a retarded noob, it's true ... :p)

3rods 04-08-2008 12:38 PM

Use these instructions to repair the BCD:

http://www.vistaclues.com/how-to-man...ws-wont-start/


Then from Vista, use this to add your linux install to the Vista (longhorn) bootloader:

http://neosmart.net/dl.php?id=1

If you try to use GRUB, windows will bash your MBR everytime (At least that's been my experience). Use the Windows bootloader to dual boot Vista and a Linux OS.

Good luck.

syg00 04-09-2008 03:25 AM

Quote:

Originally Posted by khanelias (Post 3114711)
and what exactly will this command file -sL do? because i've become a little wary of the terminal :)

Nothing wrong with a bit of paranoia ...
File tries to guess the type of a "file" - in this case we're passing it a device node to try and see what might live there. Expect to see something like this.
Code:

sudo file -sL /dev/sda7
/dev/sda7: Linux rev 1.0 ext3 filesystem data (needs journal recovery)
me@ubuntu:~$ sudo file -sL /dev/sda9
/dev/sda9: x86 boot sector, mkdosfs boot message display, code offset 0x58, OEM-ID "MSWIN4.1", sectors/cluster 8, reserved sectors 40, Media descriptor 0xf8, heads 255, hidden sectors 72517473, sectors 3903732 (volumes > 32 MB) , FAT (32 bit), sectors/FAT 3809, reserved3 0x800000, serial number 0x441520a9, unlabeled
me@ubuntu:~$ sudo file -sL /dev/sda2
/dev/sda2: x86 boot sector, code offset 0x52, OEM-ID "NTFS    ", sectors/cluster 8, reserved sectors 0, Media descriptor 0xf8, heads 255, hidden sectors 80325, dos < 4.0 BootSector (0x80)


khanelias 04-10-2008 11:26 AM

ubuntu@ubuntu:~$ sudo file -sL /dev/sda1
/dev/sda1: x86 boot sector, code offset 0x52, OEM-ID "NTFS ", sectors/cluster 8, reserved sectors 0, Media descriptor 0xf8, heads 54, hidden sectors 63, dos < 4.0 BootSector (0x80)
ubuntu@ubuntu:~$ sudo file -sL /dev/sda2
/dev/sda2: Linux rev 1.0 ext2 filesystem data (mounted or unclean) (large files)

edit: i am starting to think that i have made a typing error when formatting or partitioning. you know sda2 instead of sdb2... because both sda2 as sdb2 have the label casper-rw...
i opened QParted and found this warning on sda2 "unable to find mountpoint. unable to read the contents of this filesystem! because of this some operations may be unavailable."
... :(
what also is still bothering me is why is my usb partitioned into one part that's 700MB and one called casper-rw that's 7GB on which i can't put anything?


All times are GMT -5. The time now is 12:26 AM.