Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

While installing Debian 6.0 I went with manual partitioning and apparently messed up. The OS only loads if I start the computer in recovery mode and fdisk output doesn't have primary partition. AFAIK - I must have at least 1 primary partition for PC to boot - right? Is there a way to convert a partition from extended to primary?

Currently my partition table looks like this:

   cme@cmehost:~$ sudo fdisk -c -l /dev/sda

    Disk /dev/sda: 500.1 GB, 500107862016 bytes
    255 heads, 63 sectors/track, 60801 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: 0x00010629

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1        1216     9764864   82  Linux swap / Solaris
/dev/sda2            1216       60802   478618625    5  Extended
/dev/sda5   *        1216        6091    39158784   83  Linux
/dev/sda6            6092       60802   439458816   83  Linux

Here is my /boot/grub/grub.cfg file:

# DO NOT EDIT THIS FILE
#
# 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
  load_env
fi
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
fi

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

function load_video {
  insmod vbe
  insmod vga
  insmod video_bochs
  insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set 19b27164-6e7a-4d55-89be-9986c2a5fe73
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  load_video
  insmod gfxterm
fi
terminal_output gfxterm
insmod part_msdos
insmod ext2
set root='(hd1,msdos5)'
search --no-floppy --fs-uuid --set 19b27164-6e7a-4d55-89be-9986c2a5fe73
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='(hd1,msdos5)'
search --no-floppy --fs-uuid --set 19b27164-6e7a-4d55-89be-9986c2a5fe73
insmod png
if background_image /usr/share/images/desktop-base/spacefun-grub.png; then
  set color_normal=light-gray/black
  set color_highlight=white/black
else
  set menu_color_normal=cyan/blue
  set menu_color_highlight=white/blue
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64' --class debian --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos5)'
    search --no-floppy --fs-uuid --set 19b27164-6e7a-4d55-89be-9986c2a5fe73
    echo    'Loading Linux 2.6.32-5-amd64 ...'
    linux   /boot/vmlinuz-2.6.32-5-amd64 root=UUID=19b27164-6e7a-4d55-89be-9986c2a5fe73 ro  quiet
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initrd.img-2.6.32-5-amd64
}
menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-amd64 (recovery mode)' --class debian --class gnu-linux --class gnu --class os {
    insmod part_msdos
    insmod ext2
    set root='(hd1,msdos5)'
    search --no-floppy --fs-uuid --set 19b27164-6e7a-4d55-89be-9986c2a5fe73
    echo    'Loading Linux 2.6.32-5-amd64 ...'
    linux   /boot/vmlinuz-2.6.32-5-amd64 root=UUID=19b27164-6e7a-4d55-89be-9986c2a5fe73 ro single 
    echo    'Loading initial ramdisk ...'
    initrd  /boot/initrd.img-2.6.32-5-amd64
}
### 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;
fi
### END /etc/grub.d/41_custom ###

I checked /var/log/boot and it is empty. Are there some other files I should check? :)

UPDATE Well - I'm sort of beginning to believe that this might be some hardware issue. Since setup never even gets to grub menu. Anyway, I'll just nuke it and reinstall, no biggie. :)

UPDATE 2 - RESOLUTION

Ok - sorted! The problem as I found out was my honest belief that unetbootin was designed to allow us to install various OS'es from usb drives onto computers - which ...umm...was totally wrong. Unetbootin is a piece of software to create live usb drives so you can boot your PC from them.

So, I simply had to recreate my install thumb drive like this:

cat image.iso > /dev/sdb1
sync

or

dd if=image.iso of=/dev/sdb1

And of course everything installed just fine and easily after that.

Sorry for confusion everyone. ;)

share|improve this question
2  
If you think there are problems, I'd suggest a reinstallation from scratch. Is there some reason you can't do that? You've have plenty of opportunities to fix up your system once you have a proper installation.:-) You don't need to start now. –  Faheem Mitha Apr 30 '11 at 7:41
1  
Have you set the flag as 'bootable' on the appropriate partition? It appears that you haven't as there's no '*' in the Boot column. –  boehj Apr 30 '11 at 7:42
1  
Afaik linux doesn't care about having a primary partition. Can you give what error messages you get on boot? Also possibly your grub config (if it is not too long). –  Faheem Mitha Apr 30 '11 at 7:49
1  
You said that recovery mode worked, but regular didn't, right? If the root was wrong they would both fail. Still, the msdos thing looks strange. What did you format root as? –  Faheem Mitha Apr 30 '11 at 8:02
1  
@andre - 'msdos' in this context means an MBR partition table as opposed to a GUID partition table (i.e. this isn't your problem). –  boehj Apr 30 '11 at 8:06
show 9 more comments

1 Answer 1

up vote 2 down vote accepted

I strongly agree with Faheem.

This is kind of a "Why choose the easiest solution when one can do it the hard way?" case.

Seriously, put your CD, erase everything, let the installer choose or just use 2 partitions: / (Root) and Swap (2 times your RAM). Done. I like to put my /home in another partition to make backups and re-installations easier.

share|improve this answer
    
I did point out in the comments that I'm doing it only to better understand how linux works. I've reinstalled it from scratch already with the same result though. –  Stann Apr 30 '11 at 11:16
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.