| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
|
By runlevel0 at 2005-06-21 07:44
|
|
Grub is very powerful, but amazingly easy to use. It's indeed more difficult to understand the 'userfriendly' GUIs than doing things the good ol' way, as it was when men where men, women where women and DVD-ROMS where made of stone.
There's just some little concepts you need to know and with this knowledge and the fine man pages you will be able to adapt this tutorial to any situation, from an USB stick to SATA or SCSI disks. But to keep things simply I will only show how to do it on plain vanilla IDE drives.
Before we start: How Grub Calls Stuff
This is the only odd thing in grub: It doesn't call the disks as we are used to. But don't worry, is not as weird as with devfs (/dev/boo/lun/foo/bar/../../disk/stuff/.../.../and/so/on).
It's only a bit different:
- Grub uses brackets to declare a device
- The /dev/ part is not used
- device numbers and partitions are defined with numbers starting from 0
This example will show you how it works (It's easier to understand as it is to explain):
Linux standard GRUB
-----------------------------------
/dev/hda1 (hd0,0)
/dev/hda2 (hd0,1)
/dev/hdd1 (hd3,0)
Even Easier : a=0 b=1 c=2 d=3 and the partition is N-1 ... hat's all.
Now let's do some serious work
After learning how grub calls stuff, we are going to set up grub from the command line.
This is very useful as you can use it to fix grub even from the boot sequence itself.
It's astonishingly simple:
You need a CD from where to run a shell, either a livecd or your favorite distro's install CD using the 'rescue' option (F2 will show you how to launch it). Sometimes Grub itself launches it's shell when it finds errors or can't stat where the heck the kernels are.
The steps are quite simple: If grub hasn't launched the shell for you, you just need to launch it:
Now, keeping in mind the above mentioned syntax rules we will set up grub. For this example we will set up grub to reside in the MBR of the first IDE's master and the kernel will be in the second partition of the second IDE's master.
In Linux tis would be /dev/hda for the first IDE's master and /dev/hdc2 for the place where our kernel lives.
Translating to Grub's syntax: /dev/hda = (hd0) and /dev/hdc2 = (hd2,1)
So what we need to do is telling grub first where to search for the kernel we want to boot and here to place the MBR:
Code:
grub> root (hd2,1)
grub> setup (hd0)
grub> quit
That's all. With this setup we will be able to boot into our chosen kernel. Once in the distro we can tweak things to our liking editing the files /boot/grub/boo.lst or /boot/grub/grub.conf (depending on your distro).
But I will cover this later in a later update of this little HOWTO.
Stay tuned as I will be editing this to add more grub stuff (and maybe changing it to the LQ-Wiki).
|
|
|
|
All times are GMT -5. The time now is 04:35 PM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|
You can get it from here - http://partedmagic.com/wiki/PartedMa...in.PartedMagic
The latest version is 2.1 and it can be burned to CD or USB.
All I had to do was boot from the CD, and open the terminal, then use the commands from above. This is a laptop with one drive, and Suse is on hda4 (hd0,3)
--'Gator sends