Page 1 of 1

How to edit GRUB from Puppy Live CD?

Posted: Mon 03 Dec 2012, 19:58
by sspera
Hi -
I'm still a newbie, but learning by stumbling around with Puppy and Ubuntu. But I have a problem with a second-hand computer that's not properly booting up from GRUB. It's got Win 7 and a couple linux distros including one for an HTPC (XBMC Live). GRUB's been set to allow a choice, but it won't acknowledge any keyboard entry so always boots to the first option. It always goes to XBMC, and I can't do any system tweaks from there.

So I've tried to edit the 'menu.lst' file, using a Puppy Live CD, but can't locate it on any of the partitions. I may not be searching correctly, though.

I don't have any content on the HD, so I can ditch whatever partitions. I was just hoping to avoid doing anything drastic. Anything is better than being stuck where I am!

Thanks,

Scott

Posted: Mon 03 Dec 2012, 20:16
by Flash
I believe I saw another thread that seemed to be about the same question, just the other day, and it was solved. Probably in the Beginners section.

EDIT: Here's the one I was thinking of. Here's another one.

Posted: Mon 03 Dec 2012, 20:17
by rcrsn51
Do you have a wireless keyboard? USB?

Posted: Tue 04 Dec 2012, 05:50
by sspera
Thanks for responding so quickly! Wow, you guys are on top of things!

rcrsn51 - I have both. A wireless one that came from the seller, and an el-cheapo USB one from Inland. Neither work at the GRUB menu, but they both function OK when fully booted.

Flash - I'm following one of the threads you recommended, by selecting the System > Grub Bootloader Config program.

Will this overwrite the current (misbehaving) GRUB instruction set?

Does it matter where I place the GRUB files? Here is the partition info from GPARTED:

PARTITION File System Size
unallocated Unallocated 1 MB
/dev/sda1 NTFS 100 MB
/dev/sda2 NTFS 204 GB (this one looks like Win 7)
/dev/sda3 extended 94 GB
. . . /dev/sda5 ext4 92 GB
. . . unallocated unallocated 1 MB
. . . /dev/sda6 linux-swap 2 GB

It mentions putting the files in the boot directory. Ultimately I'll likely keep Win 7 on the machine and maybe keep space for other distros like Puppy. Will probably ditch the other OSs that the seller installed.

Thanks again for pitching in!

Scott

Posted: Tue 04 Dec 2012, 13:22
by Flash
That layout looks a bit weird. What is that 100 MB sda1 doing there, just wasting space and confusing Grub? Also I'm not too sure about putting Puppy, especially a swap partition, in an extended partition and I don't think Puppy likes ext4. I'd consider simplifying that layout; delete sda1 and the extended partition. Instead, make an ext2 partition for Puppy and a swap partition, both primary partitions. I don't know how dangerous all that would be, so I'd back up the contents of sda2 before I started. :?

When you're all done, sda1 should be the Windows partition because Windows expects to get the first partition on a hard disk and won't play nice if it doesn't get its way. Puppy's ok with that.

Posted: Tue 04 Dec 2012, 14:34
by rcrsn51
sspera wrote:I have both. A wireless one that came from the seller, and an el-cheapo USB one from Inland. Neither work at the GRUB menu,
You have two choices here:

1. You set up this machine as Puppy-only so it doesn't need a GRUB menu. You can do this with the one-click installer.

2. You want to multi-boot. This will require a menu so you need to resolve your keyboard issue. Look in your BIOS for a setting that enables USB keyboards. Or get an old PS/2 keyboard.

Posted: Tue 04 Dec 2012, 15:32
by bigpup
unallocated Unallocated 1 MB
/dev/sda1 NTFS 100 MB
/dev/sda2 NTFS 204 GB (this one looks like Win 7)
If this is a name brand computer, the sda1 partition could be a hidden recovery partition (Windows will not see) , where they put there system recovery backup data and programs. Seems a little small for that, but may be what it is.
Can you see what is on partition sda1?

Putting Grub stuff on first partition usually works best.

Posted: Tue 04 Dec 2012, 15:35
by rjbrewer
Flash wrote:That layout looks a bit weird. What is that 100 MB sda1 doing there, just wasting space and confusing Grub?
That 100MB sda1 is the standard Win7 boot and registry partition.
You can kiss your Win7 goodbye if you delete it!

Edit:

I use legacy grub when dual booting my Win7 drives.
Grub on MBR, menu.lst on first Linux partition.
A repair disc and backup image of Win7 to spare drive are easy to
make and necessary and highly recommended whether dual
booting or not.

Posted: Tue 04 Dec 2012, 16:16
by bigpup
rjbrewer,

Thanks for the Windows 7 info on sda1. Had my mind into Linux too much.
Did not think about the Windows 7 way of doing stuff.

Posted: Tue 04 Dec 2012, 16:35
by rjbrewer
bigpup wrote:rjbrewer,

Thanks for the Windows 7 info on sda1. Had my mind into Linux too much.
Did not think about the Windows 7 way of doing stuff.
If one has the things available to do a fresh Win7 install, it is possible
to have the boot and registry on the "main" partition.

Posted: Wed 05 Dec 2012, 02:29
by Flash
rjbrewer wrote:
Flash wrote:That layout looks a bit weird. What is that 100 MB sda1 doing there, just wasting space and confusing Grub?
That 100MB sda1 is the standard Win7 boot and registry partition.
You can kiss your Win7 goodbye if you delete it!
I don't know that I'd call that a standard Windows installation. I have a 32 GB SSD, formatted NTFS, with only Windows XP installed in it, in the default way. Gparted sees it as sda and says there is only one partition in it: sda1. Gparted does not see the boot sector as a separate partition from the Windows partition, in any drive I've tried it on. But then, I've never installed Puppy in a hard disk.

Posted: Wed 05 Dec 2012, 03:46
by sspera
It's so cool that all you guys are helping out with suggestions and questions!

This is not a name-brand computer, it's home built.

Several of you were wondering what was on the partitions.

Looking into sda1, I only see a few items: folders named "boot" and "system volume information" and three files named "bootmgr", "bootsect.bak" and "lrpat."

Clicking into the "boot" folder, I see about 25 folders, for example "en-US" and some files like "bcd."

sda2 sure looks like it contains what I would expect the Windows files to be.

sda5 looks like the ubuntu variant, with folders in /usr/share referencing ubiquity, xbmcbuntu, python, etc. Even GRUB but I can't see the 'menu.lst' file anywhere.

rcrsn51 suggested I poke around in the BIOS to see if there was a setting that could allow USB keyboard input. Great suggestion! I was able to find one and now I can cycle through the GRUB options and pick one. This puts me a long way ahead of where I was.

But is there a way to edit GRUB such that a different entry is the default one. Or remove it entirely and have a single boot machine?

Thanks!

Scott

Posted: Wed 05 Dec 2012, 04:01
by Flash
It does look like sda1 contains stuff you don't want to delete. :?
While you were in the BIOS, did you happen to notice if the computer will boot from USB? If it can, you could run Puppy from a USB flash drive, with the Save file on the same drive, and forget about the hard disk. Alternatively, if you really want a single-boot machine with Puppy as the only OS, you could reformat the hard disk drive (deleting everything that's on it) and install Puppy as the only OS. Finally, if the computer has a DVD burner and at least 256 MB of RAM, you can run Puppy from a multisession DVD (or CD, but a DVD is better) and, again, forget about the hard disk drive.

Posted: Wed 05 Dec 2012, 04:32
by James C
As rjbrewer wrote, unless you want a non-booting Windows 7 install don't delete the 100 mb boot partition.Screenies attached.

I also install grub to the mbr and put the grub files in the first Linux partition....sda6 in my case. Running Windows 7 Ultimate, PCLOS 2012 and several Puppy installs.
Windows 7....sda1 and sda2.PCLOS sda6 and Puppy installs in sda7.

Posted: Wed 05 Dec 2012, 08:52
by rjbrewer
Flash wrote:
rjbrewer wrote:
Flash wrote:That layout looks a bit weird. What is that 100 MB sda1 doing there, just wasting space and confusing Grub?
That 100MB sda1 is the standard Win7 boot and registry partition.
You can kiss your Win7 goodbye if you delete it!
I don't know that I'd call that a standard Windows installation. I have a 32 GB SSD, formatted NTFS, with only Windows XP installed in it, in the default way. Gparted sees it as sda and says there is only one partition in it: sda1. Gparted does not see the boot sector as a separate partition from the Windows partition, in any drive I've tried it on. But then, I've never installed Puppy in a hard disk.
I said standard for Windows 7, not XP!

Posted: Wed 05 Dec 2012, 13:00
by Flash
Oops. :oops: I'm a little behind the times. :lol:
A 100 MB partition for the booting info? What in the world were they thinking when they designed Windows 7? Well, that's why I prefer to use Linux rather than Windows.

Posted: Wed 05 Dec 2012, 13:56
by rcrsn51
sspera wrote:Even GRUB but I can't see the 'menu.lst' file anywhere.
If this is a recent Ubuntu, it will be using GRUB2 and a file called grub.cfg.
Or remove it entirely and have a single boot machine?
In my post above, I mentioned the One-Click Installer.

Posted: Thu 06 Dec 2012, 05:46
by sspera
Well, everyone has been great, and gotten me out of a pinch on this machine. I now have some good options to consider. I'll have to mull this over.

Thanks again for all the help!

Scott