Help! DSL on USB stick, but grub got on HDD


Forum: USB booting
Topic: Help! DSL on USB stick, but grub got on HDD
started by: squidx

Posted by squidx on Mar. 30 2007,16:12
I have successfully installed DSL on a USB stick, and booted to it just fine.

However, since I'm new at this, I still need to use my IBM T42 as a WinXP box.

When I removed the USB stick and rebooted, I got the grub> prompt. What a shock! I had no idea what to do and spent most of last night figuring out how to use it.

So now I *can* boot into Windows by entering a few lines at the grub prompt.

And it looks like grub is here to stay unless I can get a copy of the XP installer disks (no idea where mine are) and run some kind of mdf fixing routines -- on my broken cd-r. This is pretty unlikely to happen.

So, grub is ok except for a couple things: I cannot find the menu.lst (probably hidden in the mbr somewhere?) to create a menu. It boots right to DSL if the memory stick is in, but never provides me a menu to select from DSL/WinXP, and never boots directly to WinXP if the memory stick isn't present.

Does anyone know how I can get to edit this file? Should I do it from within DSL?

Also, any help with the mystery of why the DSL install put grub on my hard disk would be great. I assumed grub would only be installed on the flash drive, but that's certainly not where it is.

I know I *never* typed c:\grubinstall or did anything that would indicate it would put grub on my main drive.

Thanks,
Alex

Posted by roberts on Mar. 30 2007,18:57
Grub is not used in either of the two DSL pendrive install scripts, syslinux is the boot loader for such.

Your installation must have been a manual thing or perhaps you did a hard drive install to a pendrive (not good) and chose grub as the boot loader, with warning that it writes to your MBR.

Likely the grub in the MBR is looking for the menu.lst on the pendrive.

Perhaps someone more knowledgeable with WindowsXP can be of help in restoring your MBR.

Posted by lucky13 on Mar. 30 2007,19:13
1. Run DSL from the CD.
2. Once running Linux, you'll want to mount your Windows partition
3. Copy boot.ini to floppy. Shutdown.
4. Try to boot using your Windows recovery CD. If it starts, you're probably in good shape.
5. Hit R for recovery console.
6. Run fixmbr and fixboot.
7. Run bootcfg /rebuild. This will rewrite boot.ini, so you want to make sure you saved the previous config to floppy in the (edit) third step.
8. Cross your fingers. Try rebooting without the CD.

It should work. Let me know either way.

Posted by squidx on Mar. 30 2007,19:47
Hi Robert,

As recommended at this site:
< http://shodan.co.za/archive/damned-flash-drive/ >
which was the only site that didn't insist I needed some kind of windows boot floppy,

Notice there is no reference to grub or to doing any operation on your laptop hard drive.

I actually followed these steps exactly:



The procedure in Windows or DOS:

  1. Insert USB Flash drive and make sure it is detected by the host.
  2. BACK UP any sensitive data.
  3. Format you’re your flash drive with FAT or FAT16 file system.
         * Right click on the drive in “My Computer” -> Click on “Format…” -> Choose “FAT” under “File System” -> Click on “Start”
         * Alternatively, in the command prompt enter “format flash_drive_letter: /FS:FAT”
  4. Extract SYSLINUX to any directory that you can easily access from the command prompt.
  5. From the command prompt within the directory where you extracted SYSLINUX change to the WIN32 subdirectory (Windows NT/XP/2000/2003) or DOS subdirectory (MS-DOS, DR-DOS, PC-DOS, FreeDOS…) and enter “syslinux –s flash_drive_letter:” [Note the colon “:” at the end] to alter the boot sector on the flash drive and copy a file named LDLINUX.SYS into its root directory.
  6. Extract the contents of dsl-embedded.zip to the root of the drive ensure that the paths are intact.
  7. Double click on “dsl-windows.bat” to test emulation within Windows.
  8. Reboot and ensure in BIOS that your boot sequence has USB listed before any hard drives.
  9. Enjoy!

So the mystery remains as to where grub came from.

Posted by squidx on Mar. 30 2007,19:50
Lucky,

Thanks for the tip about saving the boot.ini.

I'm going to try this as soon as I can get my CD-R working again. That's the worst part of it.

I actually have downloaded an iso of a recovery and mbr repair utility put out by IBM/Lenovo, but I can't access it. I'm wondering if I could make another bootable usb drive with these files on it if I can make the cd-rom on another computer and get the files from it...

Alex

Posted by curaga on Mar. 31 2007,14:47
You can mount the iso in Linux:
mkdir /mnt/iso
mount theiso.iso /mnt/iso -o loop

And then copy the files where ever needed..

Also, if you have a spare pendrive, you could just try "burning" the iso to a pendrive:
dd if=theiso.iso of=/dev/sda bs=1k

And then trying to boot from it..


But if you do give up, I think it's possible to make grub automatically boot XP.. Depends a lot if your XP is on NTFS or FAT32...

edit: it seems to me that your comp boots usb natively, and there are none grub files around....

Posted by squidx on April 01 2007,00:28
Oh, I *like* the idea of burning the iso to the thumbdrive!

I'm not sure what you mean about no grub files around... the HD is NTFS. But should I just *make* some file for grub to access? If so, where should I put it? I think I understand how to build it, but I don't know where it should go.

Posted by RRRR on April 28 2007,02:57
I needed at one point to remove Grub from a MBR. What I did after trying various other stuff unsuccessfully was using MBRWork as found on < UBCD >; running the option "install standard MBR code". I can't guarantee this will work and you should probably back up your existing MBR first. But it worked for me.
Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.