PDA

View Full Version : [ubuntu] install Debian next to Ubuntu



rscott28
December 5th, 2010, 05:27 AM
I've tried to install Debian next to Ubuntu three times, and each time the Debian installer fails to recognize the Ubuntu OS. After the install, the Debian GRUB makes Ubuntu unbootable. How can I complete the install and have the choice to boot both?

sikander3786
December 5th, 2010, 05:32 AM
Welcome to the forums :-)

We need to see the output of bootinfoscript as per instructions here.

http://bootinfoscript.sourceforge.net

Please wrap your output with proper code # tags from post menu. [/code] at the end [code] at the beginning.

It'd tell us exactly everything we need to know about your setup ;-)

rscott28
December 6th, 2010, 12:15 AM
Boot Info Script 0.55 dated February 15th, 2010

============================= Boot Info Summary: ==============================

=> Grub 2 is installed in the MBR of /dev/sda and looks on the same drive in
partition #1 for (,msdos1)/boot/grub.

sda1: __________________________________________________ _______________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Ubuntu 10.10
Boot files/dirs: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda2: __________________________________________________ _______________________

File system: Extended Partition
Boot sector type: -
Boot sector info:

sda5: __________________________________________________ _______________________

File system: swap
Boot sector type: -
Boot sector info:

=========================== Drive/Partition Info: =============================

Drive: sda ___________________ __________________________________________________ ___

Disk /dev/sda: 160.0 GB, 160041885696 bytes
255 heads, 63 sectors/track, 19457 cylinders, total 312581808 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start End Size Id System

/dev/sda1 * 2,048 299,808,767 299,806,720 83 Linux
/dev/sda2 299,810,814 312,580,095 12,769,282 5 Extended
/dev/sda5 299,810,816 312,580,095 12,769,280 82 Linux swap / Solaris


blkid -c /dev/null: __________________________________________________ __________

Device UUID TYPE LABEL

/dev/sda1 d4db5107-af4a-4e39-8077-e9814d8f8b38 ext4
/dev/sda2: PTTYPE="dos"
/dev/sda5 swap
/dev/sda: PTTYPE="dos"

============================ "mount | grep ^/dev output: ===========================

Device Mount_Point Type Options

/dev/sda1 / ext4 (rw,errors=remount-ro)


=========================== sda1/boot/grub/grub.cfg: ===========================

#
# 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
set have_grubenv=true
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 recordfail {
set recordfail=1
if [ -n "${have_grubenv}" ]; then if [ -z "${boot_once}" ]; then save_env recordfail; fi; fi
}

function load_video {
insmod vbe
insmod vga
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d4db5107-af4a-4e39-8077-e9814d8f8b38
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='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d4db5107-af4a-4e39-8077-e9814d8f8b38
set locale_dir=($root)/boot/grub/locale
set lang=en
insmod gettext
if [ "${recordfail}" = 1 ]; then
set timeout=-1
else
set timeout=10
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=white/black
set menu_color_highlight=black/light-gray
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.35-23-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d4db5107-af4a-4e39-8077-e9814d8f8b38
linux /boot/vmlinuz-2.6.35-23-generic root=UUID=d4db5107-af4a-4e39-8077-e9814d8f8b38 ro quiet splash
initrd /boot/initrd.img-2.6.35-23-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-23-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d4db5107-af4a-4e39-8077-e9814d8f8b38
echo 'Loading Linux 2.6.35-23-generic ...'
linux /boot/vmlinuz-2.6.35-23-generic root=UUID=d4db5107-af4a-4e39-8077-e9814d8f8b38 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-23-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d4db5107-af4a-4e39-8077-e9814d8f8b38
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=d4db5107-af4a-4e39-8077-e9814d8f8b38 ro quiet splash
initrd /boot/initrd.img-2.6.35-22-generic
}
menuentry 'Ubuntu, with Linux 2.6.35-22-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d4db5107-af4a-4e39-8077-e9814d8f8b38
echo 'Loading Linux 2.6.35-22-generic ...'
linux /boot/vmlinuz-2.6.35-22-generic root=UUID=d4db5107-af4a-4e39-8077-e9814d8f8b38 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.35-22-generic
}
### END /etc/grub.d/10_linux ###

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

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d4db5107-af4a-4e39-8077-e9814d8f8b38
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set d4db5107-af4a-4e39-8077-e9814d8f8b38
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
if [ "x${timeout}" != "x-1" ]; then
if keystatus; then
if keystatus --shift; then
set timeout=-1
else
set timeout=0
fi
else
if sleep --interruptible 3 ; then
set timeout=0
fi
fi
fi
### 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 ###

=============================== sda1/etc/fstab: ===============================

# /etc/fstab: static file system information.
#
# Use 'blkid -o value -s UUID' to print the universally unique identifier
# for a device; this may be used with UUID= as a more robust way to name
# devices that works even if disks are added and removed. See fstab(5).
#
# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda1 during installation
UUID=d4db5107-af4a-4e39-8077-e9814d8f8b38 / ext4 errors=remount-ro 0 1
/dev/sda5 none swap sw 0 0

=================== sda1: Location of files loaded by Grub: ===================


77.4GB: boot/grub/core.img
36.7GB: boot/grub/grub.cfg
.7GB: boot/initrd.img-2.6.35-22-generic
1.2GB: boot/initrd.img-2.6.35-23-generic
77.4GB: boot/vmlinuz-2.6.35-22-generic
77.4GB: boot/vmlinuz-2.6.35-23-generic
1.2GB: initrd.img
.7GB: initrd.img.old
77.4GB: vmlinuz
77.4GB: vmlinuz.old

Hopefully this si what you where asking for sikander3786.

sikander3786
December 6th, 2010, 07:27 AM
Ubuntu is the sole operating system on your PC and it uptill now, it should be booting perfectly as seen in bootinfoscript, no problems there.

So you plan to add Debian?

During the Debian install, do you get an option to install bootloader? If yes, select not to install the bootloader at all and later, boot into Ubuntu and run this command to add debian to your Grub menu.


sudo update-grub

Or if you don't get that option, after installation of Debian, post the output of bootinfoscript once more. That when we need to see it :-)

You might then need to re-install Grub2 or just might be able to add Ubuntu to Debian's Grub (whichever appropriate) :-)

rscott28
December 6th, 2010, 03:33 PM
After I installed Debian, I had to do a clean install of Ubuntu and when I go through the Debian install, it doesn't recognize the Ubuntu Os so I have been hesitant to reinstall, put I will take note of this and give it another.....I don't want to loose me settings again

snowpine
December 6th, 2010, 04:25 PM
Which Debian release are you installing? The current Debian Stable release (Lenny) uses an older kernel and will not be able to read your Ubuntu ext4 partition. You might consider using Debian Squeeze (currently Testing but soon to be the next Stable) instead, as it has full support for ext4.

I fully agree with Sikander's advice by the way:


During the Debian install, do you get an option to install bootloader? If yes, select not to install the bootloader at all and later, boot into Ubuntu and run this command to add debian to your Grub menu: 'sudo update-grub'

There is no need to reinstall Ubuntu if you mess up Grub and can't boot it, just fix Grub. ;)

rscott28
December 7th, 2010, 12:36 AM
After I installed Debian then found out that "Lenny" didn't support my ethernet card, I had no wifi connection and was pulling my hair out. I wanted to fix grub, but with no internet, I was at a loss. I will folow both of your directions and this time do some reading before I hit the "next" button. I'm great at Windows, no CLI experience because of it now.

garvinrick4
December 7th, 2010, 12:45 AM
You can fix grub2 without internet:
Use install cd and choose try ubuntu: copy and paste these:


sudo mount /dev/sda1 /mnt

sudo grub-install --recheck --root-directory=/mnt /dev/sda


sudo umount /mnt
reboot into Ubuntu


sudo update-grub

rscott28
December 7th, 2010, 12:49 AM
Yes, as soon as a summited my last reply I felt really stupid. Boot from live CD, google "fix GRUB", and execute it. I can get really thoughtless at 3 oclock in the morning sometimes....](*,)

rscott28
December 7th, 2010, 04:00 AM
Thanks, all three of you. I installed Debian "squeeze" this evening and everything checks out perfectly. Install recognized the Ubuntu OS, I didn't install grub, just updated Ubuntu. My Wifi even works with the new release!:D

sikander3786
December 7th, 2010, 05:06 AM
Thanks, all three of you. I installed Debian "squeeze" this evening and everything checks out perfectly. Install recognized the Ubuntu OS, I didn't install grub, just updated Ubuntu. My Wifi even works with the new release!:D
Glad to know that :P

Remember, whenever installing any Linux distro in dual boot/triple boot to Ubuntu, the best workaround is not to install that distro's boot loader and just update the one from Ubuntu ;-)

Or another workaround is just to install Ubuntu after installing all other distros as you know.

Anyhow, if you are satisfied (on behalf of all the contributors), you can mark this thread Solved using Thread Tools near the top of this page.

Happy Ubuntu-ing!