DIGIT-ARC read-only archive · snapshot: July 23, 2026

Booting problem

12 posts · originally from https://geek.digit.in/community/threads/booting-problem.155948/

A
amrutansu garanaik Original post #1
Apr 23, 2012 at 8:15 PM
Hi guys...

Whenever I boot my laptop it says "unknown file system" and is redirected to "grub rescue>" prompt. How can I fix it???


Reason for this:::::

I had windows 7 home premium installed on my lappy. Then I installed ubuntu 11.04 as dual boot (wubi perhaps,not sure). Then I installed backbox by editing partition table. Then I accidentally deleted the partition containing backbox from my computer=>manage.
After on I am unable to boot my laptop. I think it has something to do with grub and MBR. I have very few knowledge about them.

What I have tried::::

In INTERNET I got to know about repairing it using live cd. I tried and got menu.lst file. I don't know how to edit it.

I also got the following commands on net.

set prefix=(hd x,y)/boot/grub

insmod(hdx,y)/boot/grub/linux.mod

insmod part_msdos
insmod ext2
insmod gzio

set root=(hdx,y)
linux /boot/vmlinuz-3.0.0-1-686-pae root=/dev/sdXX ro


After a long HIT-TRIAL process I came to know x=0,y=11
What is sdXX?
I've tried sda1,sda2,....sda12 with no result.
All the time it said "file not found"

When instead of last line I tried
"initrd /boot/initrd.img-3.0.0-1-686-pae"
it said "you need to load the kernel first".

What else can I do?????????????
doomgiver
Apr 23, 2012 at 9:31 PM
you actually edited the partition tables by hand? you might be the bravest or the craziest guy i've ever met.

1. any important data on the hdd?
2. do you have another hdd?
3. do you want to save any data on the current busted up hdd?
V
vipulbh #3
Apr 23, 2012 at 11:58 PM
The hdx,y refers to your partition in linux. hd0, hd1...hd3 all refer to the primary partitions (Max you can have is 4). hd4 refers to the extended partition and hd5 onwards refers to the logical partitions. They are also referred as hda, hdb...Same logic.

Since you had windows installed, the hd0 is taken by windows. The hd can be sd also depending on your config

Now how to repair it.
Use a live cd and get to the terminal. Type
sudo apt-get install ms-sys
sudo fdisk -1


It will give some output. Note down the following

sda1 (or whatever it outputs) aaaaaaaaa NTFS

The important part is to note the first entry with NTFS in the end.
then type

sudo ms-sys -m /dev/sda

Remember its without any numbers. (the sda can be hda or hdb or sdb..whatever). This will give you the windows bootloader. If you want grub, instead, figure out which partition linux is on using gparted or whatever partition manager is there on the live cd.

then type
sudo grub-install /dev/aaaaa (aaaaaa is the partition name with linux). Once you have grub installed just google how to add windows entry to it.


@doomgiver - life is not so pessimistic. He can still recover the entire thing easily using testdisk. Refer *www.cgsecurity.org/wiki/TestDisk_Step_By_Step
A
Apr 24, 2012 at 3:56 PM
I am an enthusiast and a crazy guy (coz: It's a new laptop, 2 months old). I was trying to learn about partition table by experimenting with it cause i didn't get much info on net.

I can access all my files using live cd. So I have recovered the important files. I also have recovery disk at home (I'm in hostel). I'll go home after 25 days and fix it.

I'm just trying to fix it without format or recovery and trying to know more about grub rescue> , linux and partition table.

Any suggestions????
doomgiver
Apr 24, 2012 at 5:47 PM
vipul, i didnt say recovery isnt possible, i was just commenting on this guy's adventurous nature xD

protip : dont have any valuable data on a experimental computer.
always have a fresh hdd image ready at hand, in case of a fubar, like this one.

also, hdx refers to a ide drive sdx refers to a sata drive.
you cannot access a extended partition like sd4, or hd4, you can only access the logical partitions it holds inside, from s/hd5 onwards.
$$Lionking$$
Apr 24, 2012 at 9:26 PM
doomgiver - u shud probably introduce him to dd.. for more storage media adventures.. :D
doomgiver
Apr 24, 2012 at 10:45 PM
dd_rescue (or was it ddrescue ?_? ) would be more appropriate.
dd just copies off whatever it finds, regardless of the data and its state.
A
Apr 25, 2012 at 1:17 PM
Hello
I've fixed the problem
I used the following commands in terminal of live cd

sudo add-apt-repository ppa:yannubuntu/boot-repair

sudo apt-get update

sudo apt-get install -y boot-repair

It created boot-repair file in administration folder
Then I replaced the grub with MBR which deleted all my linux partitions and window started booting up

P.S. What is dd_rescue???
$$Lionking$$
Apr 25, 2012 at 2:17 PM
Doomgiver - Yes, dd does a little more than just copying data... i think u shud play a little more with it too.... :p :D
doomgiver
doomgiver #10
Apr 25, 2012 at 9:23 PM
Hello
I've fixed the problem
I used the following commands in terminal of live cd

sudo add-apt-repository ppa:yannubuntu/boot-repair

sudo apt-get update

sudo apt-get install -y boot-repair

It created boot-repair file in administration folder
Then I replaced the grub with MBR which deleted all my linux partitions and window started booting up

P.S. What is dd_rescue???
Ddrescue - Forensics Wiki
Dd rescue - Forensics Wiki
my bad, both are a bit different.

also, i know my dd, thanks :p used it several times for writing data to a usb drive.
dd | Linux Journal
dd tutorial, for those who dont know.
$$Lionking$$
Apr 26, 2012 at 11:23 PM
doomgiver - I lost a partition to dd about 3 years ago, coz of a typo!!.... :(
doomgiver
doomgiver #12
Apr 26, 2012 at 11:45 PM
yup, deathdisk, is its middle name