GRUB auto boot; link to Red Hat GRUB documentation

How to do things, solutions, recipes, tutorials
Post Reply
Message
Author
User avatar
mr_shafer
Posts: 9
Joined: Sun 04 Sep 2005, 23:46
Location: Arizona USA

GRUB auto boot; link to Red Hat GRUB documentation

#1 Post by mr_shafer »

I found documentation for the GRUB boot loader program.

http://www.redhat.com/docs/manuals/linu ... gfile.html

I edited /boot/grub/menu.lst adding the following:
hiddenmenu
default=0
timeout=5

( Any old-timers remember config.sys ?) :wink:

User avatar
aahhaaa
Posts: 341
Joined: Fri 07 Oct 2005, 03:21
Location: Lower Michigan, North America

#2 Post by aahhaaa »

Belated thanks- much other useful info info here too! :D

User avatar
307
Posts: 40
Joined: Thu 09 Mar 2006, 13:51
Location: North Highlands, Scotland, UK

Many thanks !!

#3 Post by 307 »

Just what I was looking for - got the Pup booting as I wish now.

Pete

User avatar
Waikiki Websurfer
Posts: 36
Joined: Sat 19 Nov 2005, 22:39
Location: Waikiki Beach

The *real* GNU GRUB "HOWTO"

#4 Post by Waikiki Websurfer »

<SIGH>

Why do people feel the need to post documentation for an open source project such as GNU GRUB from another Linux site (Redhat), when:

1. We are using Puppy Linux, and this is a Puppy HOWTO (not Redhat)

...and more importantly:

2. The CORRECT and COMPLETE documentation for GNU GRUB is (surprise) at the GNU GRUB site. Link:

http://www.gnu.org/software/grub/manual/

The above link is documentation for "legacy" GRUB, including the 0.96 version which is installed by Puppy

Read all about GRUB ("legacy") and GRUB2 dev here:

http://www.gnu.org/software/grub/

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

<Informative rant to follow> :
The Redhat link http://www.redhat.com/docs/manuals/linu ... gfile.html also describes options which are not relevant to Puppy's GRUB 0.96, such as "splashimage" which is not supported. Redhat, Mandriva, MEPIS, etc have their GRUB menu as a splashimage. For more info on GRUB splashimages you might want to see the Rutgers HOWTO at http://ruslug.rutgers.edu/~mcgrof/grub-images/ -- but of course, you will have to install a different version of GRUB than 0.96 to have support for that feature.

Also, there is hardly any advantage to hiding the GRUB menu. You can set any timeout for default booting to the first menu.lst OSentry (or any other entry using default=n where n=entry number on the list), and you do not need to hide your menu display for that purpose.

If for some strange reason you *do* want to hide your menu, you can stop the timeout by pressing <esc> to access GRUB menu options. Again, all this info is available at:

http://www.gnu.org/software/grub/manual/grub.html

01010011011011110010000001110100011010000110010101110010011001010010000100100000
01010010010101000100011001001101
Last edited by Waikiki Websurfer on Sun 07 May 2006, 03:44, edited 1 time in total.
__O__ \/\/ \/\/
__/\___
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

User avatar
Waikiki Websurfer
Posts: 36
Joined: Sat 19 Nov 2005, 22:39
Location: Waikiki Beach

#5 Post by Waikiki Websurfer »

Edit and additions to above:

Regarding "splahsimage" support:

The Rutger's link http://ruslug.rutgers.edu/~mcgrof/grub-images/ for GRUB splahsimage HOWTO is referenced at http://www.gnu.org/software/grub/ under "Useful Links".

The http://www.bootsplash.org/index.html link, which is referenced at http://ruslug.rutgers.edu/~mcgrof/grub-images/ is not related to GRUB splahimage support, but rather to the Linux Kernel boot process. Puppy2 will use Linux Kernel 2.6.16.7 which should work with current bootsplash kernel patches.

GRUB2 developers have expressed interest in adding a graphical interface to the next alpha release:
Add a fancy menu interface which utilizes the GraphicsMode extensively with many eye-candies. This is important to beat GRUB legacy.

Ref: http://grub.enbug.org/TodoList


Fancy menu interface

We are looking forward to seeing a very fancy menu implementation, which supports animations, colorful effects, style sheets, etc. This work should be based on the GRUB's Video API, and should share as much code as possible with the text-based menu interface.

This feature is really important for GRUB 2, because GRUB Legacy has been patched by third parties frequently, as the official version never support a graphical interface, but such an interface attracts more casual users. Support for a fancy menu - even better than an unofficial patch for GRUB Legacy - would attract more people to GRUB 2, thus this is critical in a long term to accelerate the development.

Ref: http://www.gnu.org/software/grub/grub-soc.html
The next aplha release of GRUB2 is expected to have the graphical interface hashed out, and a usable GRUB2 beta is expected to be ready close to the end of the year:
1.94

Estimate Date
2006-06-04

Release Focus
EFI support, network support and better CDROM support.
Pending Items
ReiserFS, graphics-based user interface and Multiboot.

1.96

Estimate Date
2006-11-04

Release Focus
Serious stabilization and documentation.

Note
We would like to claim that GRUB 2 is beta at this stage. beta means that GRUB 2 has the same usability as GRUB Legacy.

Ref: http://grub.enbug.org/CurrentStatus
For those interested, there is a wiki describing details of the usage interface, such as RGB color depth (0-255^3=16M colors), etc. that are planned for GRUB2. Ref: http://grub.enbug.org/VideoSubsystem
__O__ \/\/ \/\/
__/\___
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

User avatar
aahhaaa
Posts: 341
Joined: Fri 07 Oct 2005, 03:21
Location: Lower Michigan, North America

#6 Post by aahhaaa »

WW-

there's a wiki here where your info might be more accessible when needed: http://puppylinux.org/wikka/GRUB

some people posting here have dual-boot machines with legacy GRUB installations of Red Hat, Mandrake, etc; they'd maybe like to remove the old partitions, update or remove the old GRUB, and have clear instructions for things like safely restoring the MBR in machines that must retain XP. That might be useful information to for you to post, if you know about it.

also, there is an edit button one can use to fix regrettably rude posts... 'nuff said? :wink:

User avatar
Waikiki Websurfer
Posts: 36
Joined: Sat 19 Nov 2005, 22:39
Location: Waikiki Beach

GRUB autoboot HOWTO

#7 Post by Waikiki Websurfer »

Thanks aahhaaa,

My initial post was *not* meant to be rude in tone, but rather :roll: in tone...

I'll consider how to edit it, but for now, I *strongly* believe that in the HOWTO section, what forum members should find is information which is as accurate and complete as possible. If I didn't know how to work with GRUB, I would've made my menu invisible, and after 5 seconds, my machine would boot to my default=0 which is Windows, and would not see Puppy at all. Hey! My Puppy ran away!?! So, I wanted to fix that, considering it's a HOWTO. Also, Puppy is not Redhat and GRUB is not Redhat.

But I'll probably edit it in some fashion...again... <SIGH> :roll: :wink:

I regged into the Wiki, and put the needed info there. I did not want to go in and fix Babb's entry so I left it at that.

What my opinion is about what should be in the GRUB Wiki:

Links to GNU GRUB and manual --> to get complete info

Compact Puppy specific HOWTO for configuration options.

...but the link to manual has all info needed, and isn't too hard to find info needed for newbies even if a quick HOWTO might be an easier source.

Something interesting:

In the GRUB "splashimage" HOWTO from GNU GRUB site there is an internal link to a bootsplash site: http://www.bootsplash.org/

At http://wiki.linuxquestions.org/wiki/GRUB they throw both together:
Using a Splash Image

You can make grub display a nice looking splash image at the menu screen. See http://ruslug.rutgers.edu/~mcgrof/grub-images/ and http://www.bootsplash.org/
...even though the second link does not involve the topic of the wiki, GRUB.

I'll fix it for them.

Aloha!

-WW
__O__ \/\/ \/\/
__/\___
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

User avatar
aahhaaa
Posts: 341
Joined: Fri 07 Oct 2005, 03:21
Location: Lower Michigan, North America

#8 Post by aahhaaa »

sounds good... not to belabor this, but-

many linux newcomers start by trialing a 'big' distro that for some reason doesn't work out for them. (in my case, it was Mandrake 9.2, which had no installed tools to get online via dialup modem; it wasn't even listed in the Help topics.)

newcomers seem always drawn to the idea of a dual boot (with XP) machine. this is where the serious flaw in GRUB takes its toll- no simple uninstaller, and a good chance of deep trouble messing with the MBR.

Puppy bypassed this tarpit with the original LiveCD conception, which is prob'ly how mr_shafer got here and was checking into GRUB info.

GRUB is fine for advanced users, but I wonder... how many potential linux users have been permanently turned off by disastrous uninstall atttempts? Its XP at fault of course, but also linux coders who leave jobs half-done.

mr_shafer hasn't posted much after his encounter with GRUB
google shows 126,000 results for 'uninstall grub'
much conflicting advice

here's a typical thread (from elsewhere, & not mine):

hi, i installed mandrake 9.2 on my wife's PC some time ago. unfortunately, the 30gig HD is running out of space, so i'd like to uninstall 9.2, combine the linux partitions to one windows partition (E: ), and remove the bootloader, all without screwing anything up!

i have no floppy drive and no windows partition utility. i used a perfectdisk demo to create the initial partitions. i have knoppix and some other bootable linux cd's if i can use them...

thanks! -jason

Old 08-24-2004, 12:09 PM #2
linmix Senior Member
Registered: Jun 2004
Location: Spain
Posts: 1,828
Distribution: FC4

Never mind about uninstalling. Use fdisk (it's on the windows 98 boot floppy and I guess also on the XP cd) to delete the linux partitions and create you windows partition. You will automatically lose all linux data. If you have a good live-cd (linux) it might have Qtparted which can do the same thing for you.

As for the boot loader, windows will automatically overwrite it with its own bootloader.

Old 08-24-2004, 03:26 PM #3
jkibbe
Registered: Jan 2004
Location: South Central PA
Posts: 49
Distribution: Mandrake 9.2, Yellow Dog Linux 3.0, Knoppix, MacOS 9

I was able to use control panels>admin tools>comp management to delete the 3 linux-related partitions and make a NTFS one. Unfortunately, XP doesn't seem to recognize this new F: drive, though I can open it up from within this comp. management program.

Also, the bootloader is still there. XP doesn't have fdisk, so i can't do the fdisk /mbr that i've read about.

I'd love to get rid of the bootloader and have the partition work.
Thanks!

Old 08-24-2004, 08:36 PM #4
jkibbe
Registered: Jan 2004
Location: South Central PA
Posts: 49
Distribution: Mandrake 9.2, Yellow Dog Linux 3.0, Knoppix, MacOS 9

Got rid of the bootloader. Booted the XP CD, hit 'R' to repair, then 'fixmbr' at prompt. Almost all is well. I just can't get XP to recognize the new partition that it created!


He didn't get any more help with that- EOT. Didn't post again. Now, XP remembers drive assignments, that might be his problem- an XP problem admittedly, but on his wife's computer...hmmm. extra ramifications to that.

including a reliable uninstaller has been standard practice for decades; I think GRUB problems might be one unrecognized area causing linux considerable user attrition.

User avatar
Waikiki Websurfer
Posts: 36
Joined: Sat 19 Nov 2005, 22:39
Location: Waikiki Beach

GRUB "uninstallation"

#9 Post by Waikiki Websurfer »

aahhaaa wrote: GRUB is fine for advanced users, but I wonder... how many potential linux users have been permanently turned off by disastrous uninstall atttempts? Its XP at fault of course, but also linux coders who leave jobs half-done.
You're most likely right in that many people who've very briefly tried a Linux distro which installs a bootloader (GRUB/LILO usually) do not have any idea how to remove that installation (including the bootloader) to restore their harddisks back to the pre-install (Windows only) state. Most of the big distros have (or at least used to have, a few years back...) uninstall directions, either in paperback manuals or on the CD, and/or online. I haven't looked into any of their documentation as I'm not really interested in restoring Windows-only HDs, so I cannot vouch for how detailed and thorough (or lacking of) they may be. I *do* know however, that searching Microsoft's pages, one can find required directions because I've seen them there some time ago (for XP).
I think I searched "fix mbr" but can't remember anymore. If you try the same search on google, the first hit will have this:"If you have Windows NT / 2000 / XP, you can boot from startup floppy disks or CD-ROM, choose repair option during setup, and run Recovery Console. When you are logged on, you can run FIXMBR command to fix MBR." Ref: http://www.ntfs.com/mbr-damaged.htm

Microsoft has something similar somewhere on their site at http://www.microsoft.com/resources/docu ... ixmbr.mspx

It is the 9th hit on google search "fix mbr", and first with "fixmbr".
aahhaaa wrote: GRUB is fine for advanced users, but I wonder... how many potential linux users have been permanently turned off by disastrous uninstall atttempts? Its XP at fault of course, but also linux coders who leave jobs half-done.
Actually I don't agree with you that it's Windows' fault that Linux and its bootloader would be difficult to remove. However, the Linux and bootloader software (or their developers / upkeepers / documentation project / etc) *is* at fault if the documentation does not have directions for "uninstalling".

I looked into what info GRUB might have for uninstalling and found the following GRUB uninstall directions (or rather, MBR restore directions) in GRUB FAQ: "For example, if you want to install the boot loader for Windows, just run FDISK /MBR on Windows." Ref: http://www.gnu.org/software/grub/grub-l ... n.html#q12

It is also the 5th link if you search google with "grub uninstall".

HOWEVER, the directions only apply to non-XP windows! All good if you Windows (or DOS...) *isn't* XP, but given that most people today have XP, the directions at http://www.ntfs.com/mbr-damaged.htm "If you have Windows NT / 2000 / XP, you can boot from startup floppy disks or CD-ROM, choose repair option during setup, and run Recovery Console. When you are logged on, you can run FIXMBR command to fix MBR." would have been a lot more helpful... So GRUB documentation certainly dropped the ball there.

The GRUB2 developers acknowledge that:"GRUB Legacy provides rich features, but it has many design and implementation faults." Ref: http://grub.enbug.org/

Obviously, so does the documentation, and the lack of accompanying open source MBR copy/restore tools for "uninstallation" of GRUB.

Hopefully the situation will improve when GRUB2 (and documentation) is released...
__O__ \/\/ \/\/
__/\___
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

User avatar
aahhaaa
Posts: 341
Joined: Fri 07 Oct 2005, 03:21
Location: Lower Michigan, North America

#10 Post by aahhaaa »

WW- thanks for the extensive reply. Just hope they are testing GRUB2 on Vista, which seems pretty touchy about its data control.

the protocol you outlined is pretty much what this guy did, followed the MS procedure, but his last post said the NTFS partition remained unrecognized.
Ah well, mebbe he rebooted and it was fine.

:D

GuestToo
Puppy Master
Posts: 4083
Joined: Wed 04 May 2005, 18:11

#11 Post by GuestToo »

the only way to "uninstall" whatever has been written to a boot sector, is to install a new boot program to that boot sector

i recently reinstalled Win XP ... i knew Windows would cheerfully over write my mbr without asking and without telling me how to restore it, so i used dd to backup the mbr to a file, installed Win XP (which took 1 hour of hard drive and cd churning and rebooting ... plus about 2 or 3 minutes of interactive time, which required me to tell it what time zone i was in, etc etc) ... i booted Puppy after Win XP finished installing (it took about 2 or 3 minutes to "install" Puppy) and used dd again to restore my mbr, so that Grub would work again

User avatar
Waikiki Websurfer
Posts: 36
Joined: Sat 19 Nov 2005, 22:39
Location: Waikiki Beach

#12 Post by Waikiki Websurfer »

Yes that's right, GuestToo. We're using the word "uninstall" in a fairly liberal fashion, and as I mentioned in a previous post, the GRUB documentation's FAQ makes the same point about terminology. Here is the complete entry:
12. How to uninstall GRUB from my hard disk drive?

There is no concept uninstall in boot loaders, because if you uninstall a boot loader, an unbootable machine would simply remain. So all you need to do is overwrite another boot loader you like to your disk, that is, install the boot loader without uninstalling GRUB.

For example, if you want to install the boot loader for Windows, just run FDISK /MBR on Windows. If you want to install LILO (I can't imagine why you want to do such a thing, though), run /sbin/lilo on GNU/Linux.
Also, it is important to keep in mind that the MBR and the boot sector are two different 512 byte sectors at different physical locations on the HD (although, very often the boot sector is the 2nd physical sector and immediately follows the 1st physical sector [MBR]). So when you "restore" the MBR, you must keep in mind that if you're simply copying an entire 512 byte sector (from another location of course, containing the original 512 byte MBR's copy) onto the MBR to "restore" it, the partition table as well as the pointer-to/adress-of the boot sector. So if the partition table has been changed since the initial MBR was written over, or the current bootloader is located in a different physical sector than before MBR write-over, the HD would not find the bootloader, and the partition table would not match.

Here is a depiction of the layout of the MBR, courtesy of Wikipedia:
Address Function
+---------------------------------------+
| 0x0000 Code Area (440 Bytes max.) |
|=======================================|
| 0x01B8 4 byte disk serial number | (Used by Windows 2000
| 2 bytes null (0) | and newer.)
|=======================================|
| 0x01BE 16 byte partition table entry|
|=======================================|
| 0x01CE 16 byte partition table entry|
|=======================================|
| 0x01DE 16 byte partition table entry|
|=======================================|
| 0x01EE 16 byte partition table entry|
|=======================================|
| 0x01FE 2 byte MBR signature (0xAA55)|
+---------------------------------------+
(The formatting is off because Puppy Forum does not retain original console font's uniform spacing, but rather uses a font (Times Roman?) with more readable font spacing)

Note the entry about Windows. The Windows Disk Signature is located at the offsets 0x01B8-0x01BB. I've heard that GRUB and LILO do not overwrite this are but rather leave it as it is. Because the GRUB stage1 file is exactly 512 bytes long, the WDS should be contained within GRUB stage1 file. However, to properly "restore" the MBR to a working state the physical structure and locations of the partition table and bootloader must match what is currently on the disk, or the state to which it will be modified (by Win XP install for instance).

I once used third-party MBR copying tools for a "just in case" scenario, and when the MBR-to-bootloader adressing one day got misdierected, tried to restore the MBR, but was unsuccesful in doing so. What I learned from that misadventure is to be careful with the MBR, and the best way to be careful IMHO is by proper planning in what you want to do, and then doing that correctly (rather than a "let's just try this" approach). So, if you plan on installing and multibooting a Linux/BSD/Solaris/Windows/DOS/etc distro on the same disk as (an)other operating system(s), you should already be either quite certain that this is what you actually want, or that you're able to backtrack whenever necessary. What "aahaaa" said about newbie Linux installs is probably unfortunately true, and as a philosophical note, the open source community should make tools (counterintuitive as they may seem) that are able to remove open source software in a "restore from backup" fashion, so that installation and removal of entire operating systems would be possible for Windows users. It's crazy, isn't it, but we *do* live in a Windows world, and after my Puppy 108's Xwindows, or Mozilla, or who-knows-what just crashed an hour ago ruining all my posts and open tabs worth of work, *I* thought about booting into Windows to post this message (and others) before cooler heads prevailed and I obediently crawled back into the Kennel. Good things, after all, don't always come easy.
__O__ \/\/ \/\/
__/\___
/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

Post Reply