LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   Dual boot Kubuntu 13.04 and XP (https://www.linuxquestions.org/questions/ubuntu-63/dual-boot-kubuntu-13-04-and-xp-4175476208/)

starsage77 09-06-2013 01:34 PM

Dual boot Kubuntu 13.04 and XP
 
I've been trying to install Kubuntu 13.04 on a drive with an existing Windows XP install (NTFS) but try as I might Grub doesn't seem to properly configure in order to build a functional boot menu

I have tried both using Gparted as well as the Kubuntu installer to build the Ext4 and Swap partitions but afterward the system still just boots to a Grub prompt.

I've tried using the Boot Repair disc I burned and that doesn't seem to do any good either. I've considered just wiping the drive and installing Linux first.

Any suggestions?

yancek 09-06-2013 03:27 PM

Boot the Kubuntu installation medium and log in to a terminal as root user and enter the following command: fdisk -l(Lower Case Letter L in the command) This will show drive/partition information. How many partitions did you have before installing Kubuntu? Successfully creating the ext4 and swap partitions doesn't really have anything to do with booting. Did you accept the defaults for Device for bootloader installation? How old is this computer and what hardware do you have?

starsage77 09-06-2013 03:57 PM

Quote:

Originally Posted by yancek (Post 5023264)
Boot the Kubuntu installation medium and log in to a terminal as root user and enter the following command: fdisk -l(Lower Case Letter L in the command) This will show drive/partition information. How many partitions did you have before installing Kubuntu? Successfully creating the ext4 and swap partitions doesn't really have anything to do with booting. Did you accept the defaults for Device for bootloader installation? How old is this computer and what hardware do you have?

I had one NTFS partition. I have an IBM Thinkpad T30 (circa '02 according to Wikipedia) with a Intel Mobile Pentium 4-M processor. I've previously run Kubuntu 13.04 as a standalone OS on this same machine without problems.

yancek 09-06-2013 05:32 PM

You forgot to post your drive/partition info. To save time, why don't you go to the site below and read the instructions and download and run the bootinfoscript and post the output here, a results.txt fiel

http://sourceforge.net/projects/bootinfoscript/

starsage77 09-06-2013 06:51 PM

Quote:

Originally Posted by yancek (Post 5023327)
You forgot to post your drive/partition info. To save time, why don't you go to the site below and read the instructions and download and run the bootinfoscript and post the output here, a results.txt fiel

http://sourceforge.net/projects/bootinfoscript/

I can't boot into Linux on that machine. How would I run it?

yancek 09-06-2013 07:22 PM

How are you plannig to install Kubuntu? You must have a CD/DVD or flash drive. Boot the Kubuntu medium you have and use it.

starsage77 09-08-2013 11:39 PM

Quote:

Originally Posted by starsage77 (Post 5023347)
I can't boot into Linux on that machine. How would I run it?

Boot Info Script 0.61 [1 April 2012]


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

=> Grub2 (v1.99) is installed in the MBR of /dev/sda and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and looks
for (,msdos5)/boot/grub on this drive.

sda1: __________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP: NTFS
Boot sector info: No errors found in the Boot Parameter Block.
Operating System: Windows XP
Boot files: /boot.ini /GRLDR /ntldr /NTDETECT.COM

sda2: __________________________________________________________________________

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

sda5: __________________________________________________________________________

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

sda6: __________________________________________________________________________

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

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

Drive: sda _____________________________________________________________________

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes

Partition Boot Start Sector End Sector # of Sectors Id System

/dev/sda1 * 63 324,545,129 324,545,067 7 NTFS / exFAT / HPFS
/dev/sda2 324,546,558 488,396,799 163,850,242 5 Extended
/dev/sda5 324,546,560 486,395,903 161,849,344 83 Linux
/dev/sda6 486,397,952 488,396,799 1,998,848 82 Linux swap / Solaris


"blkid" output: ________________________________________________________________

Device UUID TYPE LABEL

/dev/loop0 squashfs
/dev/sda1 3008346C08343368 ntfs
/dev/sda5 c3f30193-fef9-4b95-b17d-bb3dbd007674 ext4
/dev/sda6 dfd5471e-15dd-42eb-aa71-3dae1c7e7178 swap

================================ Mount points: =================================

Device Mount_Point Type Options

/dev/sr0 /live/image iso9660 (ro,noatime)


================================ sda1/boot.ini: ================================

--------------------------------------------------------------------------------
[boot loader]

timeout=10

default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS

[operating systems]

multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect



--------------------------------------------------------------------------------

=========================== sda5/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 video_bochs
insmod video_cirrus
}

insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root c3f30193-fef9-4b95-b17d-bb3dbd007674
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root c3f30193-fef9-4b95-b17d-bb3dbd007674
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
if [ "${recordfail}" = 1 ]; then
set timeout=10
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
if background_color 75,75,75; then
clear
fi
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
set gfxpayload="$1"
if [ "$1" = "keep" ]; then
set vt_handoff=vt.handoff=7
else
set vt_handoff=
fi
}
if [ ${recordfail} != 1 ]; then
if [ -e ${prefix}/gfxblacklist.txt ]; then
if hwmatch ${prefix}/gfxblacklist.txt 3; then
if [ ${match} = 0 ]; then
set linux_gfx_mode=keep
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=text
fi
else
set linux_gfx_mode=keep
fi
else
set linux_gfx_mode=text
fi
export linux_gfx_mode
if [ "$linux_gfx_mode" != "text" ]; then load_video; fi
menuentry 'Ubuntu, with Linux 3.2.0-23-generic-pae' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root c3f30193-fef9-4b95-b17d-bb3dbd007674
linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=c3f30193-fef9-4b95-b17d-bb3dbd007674 ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.2.0-23-generic-pae
}
menuentry 'Ubuntu, with Linux 3.2.0-23-generic-pae (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root c3f30193-fef9-4b95-b17d-bb3dbd007674
echo 'Loading Linux 3.2.0-23-generic-pae ...'
linux /boot/vmlinuz-3.2.0-23-generic-pae root=UUID=c3f30193-fef9-4b95-b17d-bb3dbd007674 ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.2.0-23-generic-pae
}
### 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,msdos5)'
search --no-floppy --fs-uuid --set=root c3f30193-fef9-4b95-b17d-bb3dbd007674
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos5)'
search --no-floppy --fs-uuid --set=root c3f30193-fef9-4b95-b17d-bb3dbd007674
linux16 /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Professional (on /dev/sda1)" --class windows --class os {
insmod part_msdos
insmod ntfs
set root='(hd0,msdos1)'
search --no-floppy --fs-uuid --set=root 3008346C08343368
drivemap -s (hd0) ${root}
chainloader +1
}
### 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 ###
--------------------------------------------------------------------------------

=============================== sda5/etc/fstab: ================================

--------------------------------------------------------------------------------
# /etc/fstab: static file system information.
#
# Use 'blkid' 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/sda5 during installation
UUID=c3f30193-fef9-4b95-b17d-bb3dbd007674 / ext4 errors=remount-ro 0 1
# swap was on /dev/sda6 during installation
UUID=dfd5471e-15dd-42eb-aa71-3dae1c7e7178 none swap sw 0 0
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

?? = ?? boot/grub/core.img 1
?? = ?? boot/grub/grub.cfg 1
?? = ?? boot/initrd.img-3.2.0-23-generic-pae 2
?? = ?? boot/vmlinuz-3.2.0-23-generic-pae 1
?? = ?? initrd.img 2
?? = ?? vmlinuz 1

=============================== StdErr Messages: ===============================

xz: (stdin): Compressed data is corrupt
No volume groups found
mdadm: No arrays found in config file or automatically

yancek 09-09-2013 10:20 AM

The bootinfoscript hows your Kubuntu Grub2 installed to the mbr and pointing to sda5 which is correct. The grub.cfg file seems correct with the correct partitions indicated for both Kubuntu and windows and the uuid numbers are also correct. The only problem I see that I would not expect is at the bottom of the script where it shows

Quote:

sda5: Location of files loaded by Grub:
Note the ?? there and the message below. I would suggest you use the Kubuntu medium to reinstall Grub2. Instructions are at the Ubuntu link below under Section 2.2, the LiveCD or chroot options.

starsage77 09-09-2013 10:29 AM

Quote:

Originally Posted by yancek (Post 5024681)
The bootinfoscript hows your Kubuntu Grub2 installed to the mbr and pointing to sda5 which is correct. The grub.cfg file seems correct with the correct partitions indicated for both Kubuntu and windows and the uuid numbers are also correct. The only problem I see that I would not expect is at the bottom of the script where it shows



Note the ?? there and the message below. I would suggest you use the Kubuntu medium to reinstall Grub2. Instructions are at the Ubuntu link below under Section 2.2, the LiveCD or chroot options.

I've reinstalled Grub2 many times. I've also deleted the Ext4 and Swap partitions (generated during install) using Gparted and have re run install several times.. doesn't seem to matter if I've used Ubuntu Server 12.04 or Kubuntu 12.04 never fail I always get the Grub rescue prompt afterward. And I've run the Boot Disk Repair cd ad nauseum

I don't know what I'm doing wrong

colorpurple21859 09-09-2013 11:43 AM

At the grub rescue prompt try this:

Code:

grub rescue>  set prefix=(hd0,5)/boot/grub
grub rescue>  set root=(hd0,5) 
grub rescue>  insmod normal
grub rescue>  insmod linux 
grub rescue>  linux (hd0,5)/vmlinuz  root=/dev/sda5
grub rescue>  initrd (hd0,5)/initrd.img 
grub rescue>  boot

If so once inside run sudo install-grub and sudo update-grub to reinstall grub

starsage77 09-09-2013 08:34 PM

Quote:

Originally Posted by colorpurple21859 (Post 5024709)
At the grub rescue prompt try this:

Code:

grub rescue>  set prefix=(hd0,5)/boot/grub
grub rescue>  set root=(hd0,5) 
grub rescue>  insmod normal
grub rescue>  insmod linux 
grub rescue>  linux (hd0,5)/vmlinuz  root=/dev/sda5
grub rescue>  initrd (hd0,5)/initrd.img 
grub rescue>  boot

If so once inside run sudo install-grub and sudo update-grub to reinstall grub

I tried issuing those commands exactly and I got as far as the third line before it displayed the message 'error: no such partition'

colorpurple21859 09-09-2013 10:05 PM

You don't happen to have a usb key/disk inserted throwing the drive count off? Another thing to try is this
http://karuppuswamy.com/wordpress/20...-rescue-prompt

starsage77 09-09-2013 11:29 PM

Quote:

Originally Posted by colorpurple21859 (Post 5024976)
You don't happen to have a usb key/disk inserted throwing the drive count off? Another thing to try is this
http://karuppuswamy.com/wordpress/20...-rescue-prompt

Nope. And I issued the 'ls' command at the grub rescue prompt and all that displayed was: (hd0) (hd0,msdos1)

colorpurple21859 09-10-2013 11:04 AM

What kind of errors did you get when trying to chroot into the Ubuntu partition?

starsage77 09-10-2013 11:09 AM

Quote:

Originally Posted by colorpurple21859 (Post 5025330)
What kind of errors did you get when trying to chroot into the Ubuntu partition?

How do I do that.. when I get 'no such partition' ?


All times are GMT -5. The time now is 01:38 PM.