LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   XP Overrides Linux Mint in Boot Up (https://www.linuxquestions.org/questions/linux-newbie-8/xp-overrides-linux-mint-in-boot-up-949128/)

peterrust99 06-07-2012 10:13 PM

XP Overrides Linux Mint in Boot Up
 
I'm a newbie. I have installed Linux Mint 13 Mate which works well once its loaded but I can't seem get Linux to boot up automatically. After turning on the pc it automatically goes into XP. If I want to use linux I have to boot up with the usb stick that I created. Start up manager and the grub customizer show Linux as the default OS.
Thanks.

syg00 06-07-2012 11:35 PM

That might imply you never installed grub to the MBR of the (internal) hard disk, but to the USB only. Hopefully Mint has bootinfoscript pre-installed - open a terminal and run
Code:

sudo bash boot_info_script.sh
.
If it doesn't work, go here and do as it says - in either case, post the RESULTS.txt it generates here so we can see what the layout is.

peterrust99 06-08-2012 12:44 AM

Apparently the bootscript info wasn't preinstalled?? I followed your next instruction and here are the results. Thx.

Boot Info Script 0.61 [1 April 2012]


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

=> Windows is installed in the MBR of /dev/sda.
=> Grub2 (v1.99) is installed in the MBR of /dev/sdb and looks at sector 1 of
the same hard drive for core.img. core.img is at this location and uses an
embedded config file:

---------------------------------------------------------------------------
search.fs_uuid 07bd9cee-a261-44ae-96bf-41662cd675dc root
set prefix=($root)/boot/grub
---------------------------------------------------------------------------
-----.

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 /ntldr /NTDETECT.COM

sda2: __________________________________________________________________________

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

sda5: __________________________________________________________________________

File system: ntfs
Boot sector type: Windows XP: NTFS
Boot sector info: According to the info in the boot sector, sda5 starts
at sector 63.
Operating System:
Boot files:

sda6: __________________________________________________________________________

File system: ext4
Boot sector type: -
Boot sector info:
Operating System: Linux Mint 13 Maya
Boot files: /boot/grub/grub.cfg /etc/fstab /boot/grub/core.img

sda7: __________________________________________________________________________

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

sdb1: __________________________________________________________________________

File system: vfat
Boot sector type: SYSLINUX 4.06 4.06-pre1
Boot sector info: Syslinux looks at sector 15254 of /dev/sdb1 for its
second stage. SYSLINUX is installed in the directory.
No errors found in the Boot Parameter Block.
Operating System:
Boot files: /syslinux/syslinux.cfg /ldlinux.sys

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

Drive: sda _____________________________________________________________________

Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 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 209,712,508 209,712,446 7 NTFS / exFAT / HPFS
/dev/sda2 209,712,571 976,771,071 767,058,501 f W95 Extended (LBA)
/dev/sda5 209,712,573 873,476,003 663,763,431 7 NTFS / exFAT / HPFS
/dev/sda6 873,476,096 971,532,287 98,056,192 83 Linux
/dev/sda7 971,534,336 976,771,071 5,236,736 82 Linux swap / Solaris


Drive: sdb _____________________________________________________________________

Disk /dev/sdb: 2002 MB, 2002747392 bytes
32 heads, 63 sectors/track, 1940 cylinders, total 3911616 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/sdb1 * 63 3,911,039 3,910,977 c W95 FAT32 (LBA)


"blkid" output: ________________________________________________________________

Device UUID TYPE LABEL

/dev/sda1 AA7434A2743472E5 ntfs
/dev/sda5 88C8DA0DC8D9F980 ntfs data
/dev/sda6 07bd9cee-a261-44ae-96bf-41662cd675dc ext4
/dev/sda7 30694711-0914-48eb-ae93-14792c377281 swap
/dev/sdb1 18E0-2222 vfat PENDRIVE

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

Device Mount_Point Type Options

/dev/sda1 /media/AA7434A2743472E5 fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sda5 /media/data fuseblk (rw,nosuid,nodev,allow_other,default_permissions,blksize=4096)
/dev/sda6 / ext4 (rw,errors=remount-ro)
/dev/sdb1 /media/PENDRIVE vfat (rw,nosuid,nodev,uid=1000,gid=1000,shortname=mixed,dmask=0077,utf8=1,showexec,flush,uhelper=udisks)


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

--------------------------------------------------------------------------------
[boot loader]
timeout=30
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
--------------------------------------------------------------------------------

=========================== sda6/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,msdos6)'
search --no-floppy --fs-uuid --set=root 07bd9cee-a261-44ae-96bf-41662cd675dc
if loadfont /usr/share/grub/unicode.pf2 ; then
set gfxmode=auto
load_video
insmod gfxterm
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root 07bd9cee-a261-44ae-96bf-41662cd675dc
set locale_dir=($root)/boot/grub/locale
set lang=en_US
insmod gettext
fi
terminal_output gfxterm
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/06_mint_theme ###
set menu_color_normal=white/black
set menu_color_highlight=white/light-gray
### END /etc/grub.d/06_mint_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 'Linux Mint 13 MATE 32-bit, 3.2.0-23-generic (/dev/sda6)' --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
gfxmode $linux_gfx_mode
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root 07bd9cee-a261-44ae-96bf-41662cd675dc
linux /boot/vmlinuz-3.2.0-23-generic root=UUID=07bd9cee-a261-44ae-96bf-41662cd675dc ro quiet splash $vt_handoff
initrd /boot/initrd.img-3.2.0-23-generic
}
menuentry 'Linux Mint 13 MATE 32-bit, 3.2.0-23-generic (/dev/sda6) -- recovery mode' --class linuxmint --class gnu-linux --class gnu --class os {
recordfail
insmod gzio
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root 07bd9cee-a261-44ae-96bf-41662cd675dc
echo 'Loading Linux 3.2.0-23-generic ...'
linux /boot/vmlinuz-3.2.0-23-generic root=UUID=07bd9cee-a261-44ae-96bf-41662cd675dc ro recovery nomodeset
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-3.2.0-23-generic
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/10_lupin ###
### END /etc/grub.d/10_lupin ###

### 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,msdos6)'
search --no-floppy --fs-uuid --set=root 07bd9cee-a261-44ae-96bf-41662cd675dc
linux16 /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
insmod part_msdos
insmod ext2
set root='(hd0,msdos6)'
search --no-floppy --fs-uuid --set=root 07bd9cee-a261-44ae-96bf-41662cd675dc
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 AA7434A2743472E5
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 ###
--------------------------------------------------------------------------------

=============================== sda6/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/sda6 during installation
UUID=07bd9cee-a261-44ae-96bf-41662cd675dc / ext4 errors=remount-ro 0 1
# swap was on /dev/sda7 during installation
UUID=30694711-0914-48eb-ae93-14792c377281 none swap sw 0 0
--------------------------------------------------------------------------------

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

GiB - GB File Fragment(s)

418.720481873 = 449.597693952 boot/grub/core.img 1
460.800933838 = 494.781235200 boot/grub/grub.cfg 1
422.909626007 = 454.095753216 boot/initrd.img-3.2.0-23-generic 1
444.638706207 = 477.427175424 boot/vmlinuz-3.2.0-23-generic 1
422.909626007 = 454.095753216 initrd.img 1
422.909626007 = 454.095753216 initrd.img.old 1
444.638706207 = 477.427175424 vmlinuz 1

========================= sdb1/syslinux/syslinux.cfg: ==========================

--------------------------------------------------------------------------------
default vesamenu.c32
timeout 100

menu background splash.jpg
menu title Welcome to Linux Mint 13

menu color screen 37;40 #80ffffff #00000000 std
MENU COLOR border 30;44 #40ffffff #a0000000 std
MENU COLOR title 1;36;44 #ffffffff #a0000000 std
MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all
MENU COLOR unsel 37;44 #50ffffff #a0000000 std
MENU COLOR help 37;40 #c0ffffff #a0000000 std
MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std
MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std
MENU COLOR msg07 37;40 #90ffffff #a0000000 std
MENU COLOR tabmsg 31;40 #ffDEDEDE #00000000 std
MENU HIDDEN
MENU HIDDENROW 8
MENU WIDTH 78
MENU MARGIN 15
MENU ROWS 5
MENU VSHIFT 7
MENU TABMSGROW 11
MENU CMDLINEROW 11
MENU HELPMSGROW 16
MENU HELPMSGENDROW 29

label live
menu label Start Linux Mint
kernel /casper/vmlinuz
append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/mint.seed boot=casper initrd=/casper/initrd.lz quiet splash --
menu default
label xforcevesa
menu label Start in compatibility mode
kernel /casper/vmlinuz
append noprompt cdrom-detect/try-usb=true persistent file=/cdrom/preseed/mint.seed boot=casper xforcevesa initrd=/casper/initrd.lz ramdisk_size=1048576 root=/dev/ram rw noapic noapci nosplash irqpoll --
label memtest
menu label Memory test
kernel memtest
label local
menu label Boot from local drive
localboot 0x80
--------------------------------------------------------------------------------

================= sdb1: Location of files loaded by Syslinux: ==================

GiB - GB File Fragment(s)

?? = ?? ldlinux.sys 1
?? = ?? syslinux/syslinux.cfg 1
?? = ?? syslinux/vesamenu.c32 1

============== sdb1: Version of COM32(R) files used by Syslinux: ===============

syslinux/vesamenu.c32 : COM32R module (v4.xx)

========= Devices which don't seem to have a corresponding hard drive: =========

sdc sdd sde sdf

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

xz: (stdin): Compressed data is corrupt

syg00 06-08-2012 01:47 AM

Yep, as I suspected, the Windoze loadere is still in the MBR. The rest looks o.k.

When you boot the USB, do you run from the USB, or do you select "Boot first hard disk" (or whatever the option uis these days) ?. Your answer affects the recovery you do.

peterrust99 06-08-2012 04:55 AM

I start up the pc and enter boot up screen (f12) which gives me a choice of boot up with hard disk or cd rom. I choose hard disk and then it goes to the next screen which gives me a choice of W2....(I assume this is xp) or usb....(linux). I choose usb which takes me to the next screen which gives me 4 or 5 choices. The first one on the list is Linux which I then select. After that Linux Mint 13 opens up.

yancek 06-08-2012 08:26 AM

What you describe happening in your last post is exactly what would be expected based on the output of the bootinfoscript. You have Mint installed on a 2GB flash drive with the Mint bootloader on that drive also. You're not going to be able to do much with it because if you download software, create files/directories you will soon run out of space on the flash drive. If you install the Mint bootloader to the master boot record of the primary drive, you will be unable to boot either xp or Mint (obviously) without the flash. If you want to use a full version of Mint, you would be better off installing it to a hard drive. If you are just trying Mint out, leave it the way it is. If you want to do something else, post back with your intentions.

peterrust99 06-08-2012 08:38 AM

Thanks for the reply. Yes, I'd like to use the full version of mint.

EDDY1 06-08-2012 03:28 PM

Quote:

Originally Posted by yancek (Post 4698751)
What you describe happening in your last post is exactly what would be expected based on the output of the bootinfoscript. You have Mint installed on a 2GB flash drive with the Mint bootloader on that drive also. You're not going to be able to do much with it because if you download software, create files/directories you will soon run out of space on the flash drive. If you install the Mint bootloader to the master boot record of the primary drive, you will be unable to boot either xp or Mint (obviously) without the flash. If you want to use a full version of Mint, you would be better off installing it to a hard drive. If you are just trying Mint out, leave it the way it is. If you want to do something else, post back with your intentions.

I believe mint is installed sda6 & sda7 just not to mbr

yancek 06-08-2012 06:00 PM

Quote:

I believe mint is installed sda6 & sda7 just not to mbr
Well, as they say at firefox "that's embarassing". I don't know how I missed that. Thanks for pointing it out. Below is a link to linux mint which explains resinstalling Grub2 to the mbr from the CD. Your root directory should be sda6. You do understand this will overwrite the windows code in the mbr? Should not be a problem as Grub2 usually detects other systems (windows) and will create an entry in the boot menu. If you have a problem, post back and I'm sure someone will be able to help.

http://community.linuxmint.com/tutorial/view/245

Or from the booted system. The link below has a lot of useful info on Grub2.

http://members.iinet.net/~herman546/...ate_and_repair

peterrust99 06-08-2012 10:56 PM

I followed the last instructions:

1. sudo mount /dev/sda6 /mnt
2. sudo grub-install --root-directory=/mnt/ /dev/sda
3. sudo update-grub

Next, I removed the usb stick and restarted the pc.
Screen appears:
“Veryfying DMI Pool Data………
Error: file not found.
Grub rescue>”

I used control alt delete to get out of that screen.

I tried to boot again with the usb stick and was able to get into linux, luckily. Also, I booted another time with the usb and was able to get back into xp.

Yikes!

yancek 06-08-2012 11:12 PM

Did you do this process from the flash drive with Mint?

peterrust99 06-08-2012 11:19 PM

Yes, I used the usb stick to open up mint then followed the previous instructions. I rebooted after that and then I got that screen message: ......grub rescue>

EDDY1 06-09-2012 01:56 AM

If your grub is on the mint usb you can just use
Quote:

apt-get install grub-pc /dev/sda
or
Quote:

sudo apt-get install grub-pc /dev/sda

syg00 06-09-2012 04:03 AM

Quote:

Originally Posted by peterrust99 (Post 4699217)
3. sudo update-grub

Wrong - that was supposed to be after you rebooted.
Now you're going to need a chroot. Try this from the liveUSB
Code:

sudo mount /dev/sda6 /mnt
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
sudo chroot /mnt
sudo grub-install /dev/sda
sudo update-grub


americast 06-09-2012 05:15 AM

Here is a simple solution:
1) Boot up with XP
2) Right Click on My Computer and select properties
3) Click on the Advanced tab.
4) Click on 'Settings' under Startup and Recovery
5) Select your default boot OS under Default Operating System list.

Thanks...


All times are GMT -5. The time now is 08:35 AM.