-   Linux - General (
-   -   Debian Testing can't start with GRUB - "unknown filesystem" (

Pawbla 08-31-2010 07:00 PM

Debian Testing can't start with GRUB - "unknown filesystem"
Hello there. I have some trouble involving Debian and GRUB.

If that helps, I'm going to explain the sequence of events that brought me here. I had Debian Lenny installed in my computer, in sda1, no troubles. But I had a problem with installing Windows in sda3, so I installed it in sda1 when I decided I wanted to install Debian Squeeze. I installed Debian via netinst in sda3. I tried to boot it a couple of times but I was unable to do so, but I just thought maybe it had some problem with my previous Debian install. I, then, installed Windows XP in sda1. Of course GRUB disappeared, so I tried to do the usual stuff to get it back. But stage1 was nowhere to be found. I tried reinstalling Debian, but no luck. I keep getting the same message. I tried grub-install and update-grub like it's advised in most places, among some other stuff.

I don't know why it still says unknown filesystem; it can be accessed from Windows, Puppy and Ubuntu live without any troubles, like any standard ext3 partition. I got Ubuntu to recognize it while in the "grub" command, but I couldn't make it work afterwards. I don't remember the exact error (sorry).

I can't find stage1, and I don't have a menu.lst.

My partitions:
sda1 is Windows
sda2 is split in two: sda5 is the swap and sda6 is /home
sda3 is /

I tried googling but no luck. Please tell me if you need any other information you need to help.

PS. I have no trouble deleting and formatting partitions, if it's an easy solution, please tell me.

Thanks a lot.

pljvaldez 08-31-2010 07:16 PM

I'm confused by your partitioning scheme. I'm not sure grub can handle a primary partition after a logical partition (or your numbering is not correct). Typically logical (i.e. split partitions) are put as the last primary partition. Can you post the output of fdisk -l (from a live CD if necessary)?

Pawbla 08-31-2010 07:36 PM

I was suspecting that was the problem (as well as Window's problem with sda3), but I sincerely didn't want to backup such a big partition just to "try out of a feeling". Oh well, time to free some space. Thanks for your help!

It is indeed as I described. I'm going to try and report it back when I finish.

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

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        851    6835626    7  HPFS/NTFS
/dev/sda2            852      18484  141637042    5  Extended
/dev/sda3          18485      19458    7817216  83  Linux
/dev/sda5            852        1128    2224971  82  Linux swap / Solaris
/dev/sda6            1129      18484  139412038+  83  Linux

syg00 08-31-2010 07:51 PM

Before you do anything drastic, let's see the (disk) menu.lst (or grub.cfg)
And "parted -l"

Pawbla 08-31-2010 08:08 PM


ubuntu@ubuntu:~$ sudo parted -l
Model: ATA SAMSUNG HM160HC (scsi)
Disk /dev/sda: 160GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End    Size    Type      File system  Flags
 1      32.3kB  7000MB  7000MB  primary  ntfs        boot
 2      7000MB  152GB  145GB  extended                   
 5      7000MB  9278MB  2278MB  logical  linux-swap       
 6      9278MB  152GB  143GB  logical  ext3             
 3      152GB  160GB  8005MB  primary  ext3             

Warning: Unable to open /dev/scd0 read-write (Read-only file system).  /dev/scd0
has been opened read-only.
Error: /dev/scd0: unrecognised disk label


# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
set default="0"
if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true

function savedefault {
  if [ -z "${boot_once}" ]; then
    save_env saved_entry

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus

insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set 47e21a0e-c411-4e71-9a46-7fea777d3642
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set 47e21a0e-c411-4e71-9a46-7fea777d3642
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
set timeout=5
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
insmod part_msdos
insmod ext2
set root='(hd0,msdos3)'
search --no-floppy --fs-uuid --set 47e21a0e-c411-4e71-9a46-7fea777d3642
insmod png
if background_image /boot/grub/moreblue-orbit-grub.png ; then
  set color_normal=black/black
  set color_highlight=magenta/black
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686' --class debian --class gnu-linux --class gnu --class os {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos3)'
        search --no-floppy --fs-uuid --set 47e21a0e-c411-4e71-9a46-7fea777d3642
        echo        'Loading Linux 2.6.32-5-686 ...'
        linux        /boot/vmlinuz-2.6.32-5-686 root=UUID=47e21a0e-c411-4e71-9a46-7fea777d3642 ro  quiet
        echo        'Loading initial ramdisk ...'
        initrd        /boot/initrd.img-2.6.32-5-686
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
        insmod part_msdos
        insmod ext2
        set root='(hd0,msdos3)'
        search --no-floppy --fs-uuid --set 47e21a0e-c411-4e71-9a46-7fea777d3642
        echo        'Loading Linux 2.6.32-5-686 ...'
        linux        /boot/vmlinuz-2.6.32-5-686 root=UUID=47e21a0e-c411-4e71-9a46-7fea777d3642 ro single
        echo        'Loading initial ramdisk ...'
        initrd        /boot/initrd.img-2.6.32-5-686
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###
### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg;
### END /etc/grub.d/41_custom ###

I'm not sure how to see the disk menu.lst.

I can't find my external drive anyways, so I can't do anything drastic. Yet :P.

pljvaldez 08-31-2010 08:19 PM

Ah, this is grub2. Grub2 uses files in /etc/grub.d (I believe) to figure out boot order. And I'm not entirely sure how it figures out the auto discover entries. I haven't really worked with grub2 yet, so you may need to do some reading and see if you can get it to boot sda3 that way.

syg00 08-31-2010 08:31 PM

You won't have a menu.lst with grub2 - I don't use Debian, so I wasn't sure.
Are you chroot'ing before running the update-grub ?.

Pawbla 08-31-2010 08:55 PM

Oh, I guessed so :(.
Is there any way to install grub (legacy I think it's named?) from a live disk? I'm going to try now. I heard bad things about grub2. Anyways, I think the problem was here before grub2 got installed. If it wasn't, it'll get solved as soon as I can downgrade.

Yes, if I remember correctly, I used the chroot command before it (I was following some instructions that I found on the web,

Edit: Just tried update-grub chrooting and it didn't solve it.

Pawbla 08-31-2010 09:28 PM

No luck with that, still can't find stage1, but I do have a menu.lst now.

syg00 08-31-2010 09:37 PM

Is this an old machine ?. More specifically, does it have an old BIOS ?.
If so you might need to get the boot code within cylinder 1024 (say 8 Gig roughly).

I always still use a small /boot partition at the front of the disk even on new machines - old habits die hard. Quick test would be to delete that swap, add a small /boot (as a logical), and put the swap back. Will mess with things a bit, but easy test.

Pawbla 08-31-2010 09:43 PM

Yes, it's a pretty old one. 5 years or something like that. It's an old Toshiba laptop. Never updated the BIOS as I don't understand quite well how to do it. I'm going to test it but I guess that is the problem, I read something about the cylinders when I tried to install windows the first time.
So, if I understand correctly, I have the 7 gigs partition as sda1, if I were to put the other 8 gigs partition (/) as sda2, that would solve my problem?

syg00 08-31-2010 09:51 PM

Nope, it's outside the boundary. Hence my suggestion.

Pawbla 08-31-2010 10:04 PM

The whole partition needs to be inside the 8 gigs?
Now I can see the utility of a separate /boot partition.

Thanks, I'll try that.

syg00 08-31-2010 10:45 PM


Originally Posted by Pawbla (Post 4084231)
The whole partition needs to be inside the 8 gigs?

Not strictly - just those bits that the stage1 loader code might like to locate.
When you first install you might be o.k., but what happens when an update shifts the stage2 (or worse part of it) ?.
I have a dislike of "odd-ball" problems appearing at indeterminate times.

All times are GMT -5. The time now is 07:20 AM.