LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   XP on internal drive wouldn't boot w/out Linux external one attached; now not at all (https://www.linuxquestions.org/questions/linux-newbie-8/xp-on-internal-drive-wouldnt-boot-w-out-linux-external-one-attached%3B-now-not-at-all-789072/)

sidthesloth 02-14-2010 02:24 PM

XP on internal drive wouldn't boot w/out Linux external one attached; now not at all
 
A few days ago I downloaded and burned the Ubuntu 9.10 live disk. I wanted to install it onto a portable external drive attached to my desktop so as not to mess with others who use the internal drive for XP. When I installed it I made sure the internal drive wasn't touched, and only used the blank external one. I made the external drive bootable with the disk utility, restarted everything and Grub was very cooperative in letting me pick an OS. But when i tried to start the computer without the external drive (to get into XP) because i want the linux drive to be portable, Grub tried to boot, said "Error: no such disk" and wouldn't access the internal C: drive top start up Windows. I googled for help, installed lilo (maybe not properly) on the portable drive, and when that didn't work installed grub on the C: drive. Now when i turn on the computer i get Grub saying it has a GEOM error and that i need to replace a disk. This happens in every case i could think of besides booting from the live Ubuntu CD. Can anyone help? I have some family members very mad at me about this.

Also, the external drive doesn't boot linux up when attached to other computers.

Quakeboy02 02-14-2010 02:34 PM

It sounds like you managed to install grub on the internal drive. All is not lost. You can either spend a bunch of time learning all about grub somewhere, or you can do the following: Download a copy of Super Grub Disk and install it on a CD as an image. Boot the machine from that CD and select the automatic option. It should be able to fix grub for you. I'm not sure whether it will automatically put an entry in for you for XP, but I'm betting it will.

syg00 02-14-2010 04:16 PM

Won't work if the external is broken. Better to get the machine booting from the internal.
Boot your XP install CD and select recovery centre when it says to. Run fixmbr and reboot.

You can then use the liveCD to check out the external.

sidthesloth 02-14-2010 06:46 PM

i don't think the external is broken, because i can still access all the files from another computer; it just isn't booting.
i've tried downloading a super grub disk .iso, but whenever i go near a site with the download my internet slows down to nothing. any ideas?

Quakeboy02 02-14-2010 06:59 PM

Quote:

Originally Posted by sidthesloth (Post 3863739)
i don't think the external is broken, because i can still access all the files from another computer; it just isn't booting.
i've tried downloading a super grub disk .iso, but whenever i go near a site with the download my internet slows down to nothing. any ideas?

What do you mean "near a site"? Here is a link to the download page on the official SGD site.

http://www.supergrubdisk.org/index.php?pid=5

This mirror from that page is, I believe, in the US. The other two are in Germany, so maybe that's the problem for you.
http://download.linux-live-cd.org/Su...ies/sgd/cdrom/

Added:
You probably want this file unless you either have Linux or want to download the bzip program first. It's only 3.9 MB which isn't a large file.

http://download.linux-live-cd.org/Su...isk_0.9677.iso

Quakeboy02 02-14-2010 07:06 PM

There's another question, though, are you sure that your BIOS is setup to boot from the internal drive? Did you change that when you were doing all the other stuff?

sidthesloth 02-14-2010 08:11 PM

i got the download going fine, ran super grub and started a linux recovery something or other. i ran the fix errors option and updated the grub and now linux will boot up. i get a grub screen asking me to pick normal unubtu, a second ubuntu that's a backup or something, two memory check options, and windows XP. However, i can only choose the first ubuntu option, even though the others are recongized.

Quakeboy02 02-14-2010 08:30 PM

Added:
Quote:

i got the download going fine, ran super grub and started a linux recovery something or other. i ran the fix errors option and updated the grub and now linux will boot up.
Let me make sure. Are you saying that you can or cannot boot XP from grub?


Original:
OK, at least this is something. Bring up a terminal in Ubuntu and let us see the results of the following:
Code:

cat /boot/grub/menu.lst
sudo fdisk -l
ls /dev/[hs]d*

What this will do is show me what SGD setup for booting to XP and what Ubuntu can see of your disks. After this, we'll probably try mounting your XP disk with something like this, depending on what drive XP is on.
Code:

mount -o ro /dev/sda1 /mnt

sidthesloth 02-14-2010 09:01 PM

i pasted the code into the terminal and i got
cat: /boot/grub/menu.lst: No such file or directory
in response
i take it this isn't supposed to happen?

i ran it anyway; what part of the code do you want?

sidthesloth 02-14-2010 09:26 PM

it can see all of my disks and partitions. Windows is on /dev/sda1, like in your example code so i ran
sudo mount -o ro /dev/sda1 /mnt
and the terminal said "the device or resource is busy"

Quakeboy02 02-14-2010 09:32 PM

Quote:

Originally Posted by sidthesloth (Post 3863805)
i pasted the code into the terminal and i got
cat: /boot/grub/menu.lst: No such file or directory
in response
i take it this isn't supposed to happen?

i ran it anyway; what part of the code do you want?

Hmm. Please post the output of the other two commands as well as this:
Code:

ls /boot/grub
Maybe your grub uses a different name for menu.lst, perhaps grub.conf or something like that.

sidthesloth 02-14-2010 09:37 PM

Code:

Disk /dev/sda: 80.0 GB, 80026361856 bytes
255 heads, 63 sectors/track, 9729 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x2f91c6c7

  Device Boot      Start        End      Blocks  Id  System
/dev/sda1  *          1        9729    78148161    7  HPFS/NTFS

Disk /dev/sdb: 320.1 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x75810ffc

  Device Boot      Start        End      Blocks  Id  System
/dev/sdb1              1        129    1036161  82  Linux swap / Solaris
/dev/sdb2            130      38913  311532480    f  W95 Ext'd (LBA)
/dev/sdb5  *        130      19461  155284258+  83  Linux
/dev/sdb6          19462      38913  156248158+  7  HPFS/NTFS

is the output the second lines and

Code:

915resolution.mod  efiemu64.o    lspci.mod      reiserfs.mod
acpi.mod          efiemu.mod    lvm.mod        scsi.mod
affs.mod          elf.mod        mdraid.mod      search.mod
afs_be.mod        ext2.mod      memdisk.mod    serial.mod
afs.mod            extcmd.mod    memrw.mod      setjmp.mod
aout.mod          fat.mod        minicmd.mod    sfs.mod
ata.mod            font.mod      minix.mod      sh.mod
ata_pthru.mod      fs_file.mod    mmap.mod        sleep.mod
at_keyboard.mod    fshelp.mod    moddep.lst      tar.mod
befs_be.mod        fs.lst        msdospart.mod  terminfo.mod
befs.mod          fs_uuid.mod    multiboot.mod  test.mod
biosdisk.mod      gfxterm.mod    normal.mod      tga.mod
bitmap.mod        gptsync.mod    ntfscomp.mod    true.mod
blocklist.mod      grub.cfg      ntfs.mod        udf.mod
boot.img          grubenv        ohci.mod        ufs1.mod
boot.mod          gzio.mod      part_acorn.mod  ufs2.mod
bsd.mod            halt.mod      part_amiga.mod  uhci.mod
bufio.mod          handler.lst    part_apple.mod  unicode.pf2
cat.mod            handler.mod    part_gpt.mod    usb_keyboard.mod
cdboot.img        hdparm.mod    partmap.lst    usb.mod
chain.mod          hello.mod      part_msdos.mod  usbms.mod
cmp.mod            help.mod      part_sun.mod    usbtest.mod
command.lst        hexdump.mod    parttool.lst    vbeinfo.mod
configfile.mod    hfs.mod        parttool.mod    vbe.mod
core.img          hfsplus.mod    password.mod    vbetest.mod
cpio.mod          iso9660.mod    pci.mod        vga.mod
cpuid.mod          jfs.mod        play.mod        vga_text.mod
crc.mod            jpeg.mod      png.mod        video_fb.mod
datehook.mod      kernel.img    probe.mod      video.mod
date.mod          keystatus.mod  pxeboot.img    videotest.mod
datetime.mod      linux16.mod    pxecmd.mod      xfs.mod
device.map        linux.mod      pxe.mod        xnu.mod
diskboot.img      lnxboot.img    raid5rec.mod    xnu_uuid.mod
dm_nv.mod          loadenv.mod    raid6rec.mod    zfsinfo.mod
drivemap.mod      loopback.mod  raid.mod        zfs.mod
echo.mod          lsmmap.mod    read.mod
efiemu32.o        ls.mod        reboot.mod

is the output for the latter line
so there's a grub.cfg
i switched menu.lst for grub.cgf and here's the output:
Code:

#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by /usr/sbin/grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s /boot/grub/grubenv ]; then
  have_grubenv=true
  load_env
fi
set default="0"
if [ ${prev_saved_entry} ]; then
  saved_entry=${prev_saved_entry}
  save_env saved_entry
  prev_saved_entry=
  save_env prev_saved_entry
fi
insmod ext2
set root=(hd1,5)
search --no-floppy --fs-uuid --set 5f786776-7b18-4cff-8355-1084fcf5f3df
if loadfont /usr/share/grub/unicode.pf2 ; then
  set gfxmode=640x480
  insmod gfxterm
  insmod vbe
  if terminal_output gfxterm ; then true ; else
    # For backward compatibility with versions of terminal.mod that don't
    # understand terminal_output
    terminal gfxterm
  fi
fi
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/white
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
menuentry "Ubuntu, Linux 2.6.31-19-generic-pae" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
        set quiet=1
        insmod ext2
        set root=(hd1,5)
        search --no-floppy --fs-uuid --set 5f786776-7b18-4cff-8355-1084fcf5f3df
        linux        /boot/vmlinuz-2.6.31-19-generic-pae root=UUID=5f786776-7b18-4cff-8355-1084fcf5f3df ro  quiet splash
        initrd        /boot/initrd.img-2.6.31-19-generic-pae
}
menuentry "Ubuntu, Linux 2.6.31-19-generic-pae (recovery mode)" {
        recordfail=1
        if [ -n ${have_grubenv} ]; then save_env recordfail; fi
        insmod ext2
        set root=(hd1,5)
        search --no-floppy --fs-uuid --set 5f786776-7b18-4cff-8355-1084fcf5f3df
        linux        /boot/vmlinuz-2.6.31-19-generic-pae root=UUID=5f786776-7b18-4cff-8355-1084fcf5f3df ro single
        initrd        /boot/initrd.img-2.6.31-19-generic-pae
}
### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_memtest86+ ###
menuentry "Memory test (memtest86+)" {
        linux16        /boot/memtest86+.bin
}
menuentry "Memory test (memtest86+, serial console 115200)" {
        linux16        /boot/memtest86+.bin console=ttyS0,115200n8
}
### END /etc/grub.d/20_memtest86+ ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry "Microsoft Windows XP Home Edition (on /dev/sda1)" {
        insmod ntfs
        set root=(hd0,1)
        search --no-floppy --fs-uuid --set ded8216ed82145dd
        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 ###


Quakeboy02 02-14-2010 09:47 PM

Wow, that's a lot of stuff in there compared to mine. So, let's see the contents of grub.cfg to see what SGD found. It should be a plain text file with configuration information in it.
Code:

cat /boot/grub/grub.cfg
Let's also see what Ubuntu has mounted, in case it's already mounted your XP filesystem for some reason:
Code:

df -h

sidthesloth 02-14-2010 09:52 PM

Code:

Filesystem            Size  Used Avail Use% Mounted on
/dev/sdb5            146G  27G  112G  20% /
udev                  1.5G  292K  1.5G  1% /dev
none                  1.5G  220K  1.5G  1% /dev/shm
none                  1.5G  92K  1.5G  1% /var/run
none                  1.5G    0  1.5G  0% /var/lock
none                  1.5G    0  1.5G  0% /lib/init/rw
/dev/sdb6            150G  70M  149G  1% /media/6A90529690526919
/dev/sda1              75G  58G  18G  78% /media/DED8216ED82145DD

there's the
Code:

df -h
output

yancek 02-14-2010 10:22 PM

Quote:

installed grub on the C: drive.
the above from your initial post, big mistake. You've overwritten some of your xp boot files. When you try to boot xp now, what error message, if any, do you get? To repair the xp mbr you need an xp installation cd/dvd with a recovery option (or you can just enter R at a prompt) and run fixmbr and/or fixboot from there. Before doing this, disconnect the external so you get the right drive this time. If you don't have an xp CD, you can borrow one or download. I'd do a search here for repair xp mbr as I've seen lots of posts here at LQ where people had to repair the xp mbr.

Quakeboy02 02-14-2010 10:45 PM

OK, /dev/sda1 is mounted on "/media/DED8216ED82145DD". You can take a quick look at it and verify that it's OK, but I can't think of any reason it wouldn't be, since it mounted.

Looking at your df -h, I see that "/" is mounted on /dev/sdb5. That still indicates to me that you have changed the BIOS so that SDB is the boot drive. I'd check the BIOS and see if you can set it back to SDA, which I take to be your internal drive. With any luck, it'll boot, unless I've skipped over something when reading your post. Otherwise, you'll have to follow syg00's and yancek's advice to boot from a recovery disk and run fixmbr or fixboot.

Added:
Still, I'm surprised it won't boot from grub, unless you've really made a hash of the XP drive.

sidthesloth 02-15-2010 11:13 AM

will it matter if the Startup CD i use is for a different edition of XP than is on the hard drive?

sidthesloth 02-15-2010 11:24 AM

PHP Code:

I'd check the BIOS and see if you can set it back to SDA 

how do you do this?

Quakeboy02 02-15-2010 11:50 AM

It shouldn't matter which version of XP you use for the fixmbr program.

Generally, you can get into the BIOS by holding down the delete key when you first power it on. Generally the arrow keys move you around in the menus. On the systems I've seen, the second menu structure contains the boot order. Just to verify, what happens when you try to boot without the external drive attached? If you get grub errors, then yes you will need to run the fixmbr program.

sidthesloth 02-15-2010 05:38 PM

yeah i get grub errors. i'll run fxmbr and see what happens

sidthesloth 02-17-2010 07:36 PM

i can't find an xp boot disc anywhere, any idea where i can download one? well, actually that's not true. i got one and i can use it to boot windows, but i can't enter recovery mode from it. (i used it in another computer that said the file hal.dll was missing or corrupt on the disc)
i think it's also useful to mention that Windows recognizes my C: drive (the external one) as a USB drive, and my windows-compatible partition of my USB drive (E: ) as the Local Drive


All times are GMT -5. The time now is 09:32 AM.