How do I install Grub?

Booting, installing, newbie
Post Reply
Message
Author
jacatone
Posts: 380
Joined: Mon 26 Feb 2007, 09:16

How do I install Grub?

#1 Post by jacatone »

I've installed Puppy on my second HDD but how do I install Grub. I saw it in setup but couldn't get it to install. Is there a way for me to install it while I'm in my Win98SE first HDD? If not, how do I access Puppy without going back into the BIOS and reconfiguring to boot from second HDD? Many thanks.

User avatar
daftdog
Posts: 120
Joined: Thu 22 Jun 2006, 00:47
Location: Western Australia

Installing grub.

#2 Post by daftdog »

If you change the BIOS to boot from the 2nd drive it may not work anyway. This has been my experience. Depends on how that drive was configured re booting when you loaded it.
I dont know if 98SE can see your linux partition but if it can then the file you are looking for is /boot/grub/menu.1st. This has to be written properly for grub to be configured.
You should also be able to access your second HDD from a 'boot floppy', if you made one, or the Puppy install cd .
You should be able to run grub from the install cd. Once its loaded into ram you can run grub and it will install it on any HDD you want.

I have never had the automatic install of grub work properly! :roll:
"We are monkeys with money and guns." Tom Waits

jacatone
Posts: 380
Joined: Mon 26 Feb 2007, 09:16

#3 Post by jacatone »

If I already have Puppy installed on my second slave HDD, shouldn't I install it there? Thanks.

User avatar
craftybytes
Posts: 298
Joined: Fri 17 Nov 2006, 10:32
Location: QLD AUSTRALIA

#4 Post by craftybytes »

Unfortunately - you cannot run your Puppy from the 2nd hard drive by installing GRUB to it ..

It is due to an built-in function of the BIOS on your machine - booting can only be done from your MAIN hard drive ( 'C:\ - in Windoze, or 'hda1' in Linux ) ..

GRUB can be loaded to the 'boot' sector of your 2nd hard drive - BUT - will not be recognised as a "boot" control UNLESS your "physically" change the links on each of your hard drives ( AND possibly change the disk drive cabling as well ) to enable your 2nd drive to now be your 1st drive ..

However - if you 'boot' your system using the - Puppy Live CD - then you can 'install' GRUB - via the puppy menu - into the "boot" sector of your existing Win98se ( 'C:\' ) drive (e.g.. your 1st hard drive) .. This should 'find' your Puppy installation on your 2nd drive and (hopefully) set some default settings into it's (GRUB install on 1st drive) - /boot/grub/menu.lst - file, which you can then edit if you need to to add any extra settings to properly 'boot' your Puppy ..

Generally this is called - "dual booting" - windoze & linux ..

HTH
3 x boot:- ASROCK VIA 'all-in-one' m/b; AMD Duron 1.8Ghz+; 1.0GB RAM; 20GB hdd (WinXP Pro); 80GB hdd (MEPIS 3.4-3/Puppy v2.15CE Frugal); 1GB USB pendrive (Puppy 2.15CE Frugal); CD/DVDRW; 17" LCD monitor; HSF 56k modem... MEPIS is great.. Puppy ROCKS..

jacatone
Posts: 380
Joined: Mon 26 Feb 2007, 09:16

#5 Post by jacatone »

Interesting. So Grub can work in either Windows or Linux. When I've installed other versions of Linux, Lilo or Grub just installed automatically.

So if I'm in Puppy and I open the Grub configuration, what would I type to install it into Win98's boot sector? Thanks.

Bruce B

#6 Post by Bruce B »

jacatone,

you have unintentionally not provided sufficient specific information for others to give you reliably specific advice.

I'd be glad to help you (as would others)

(1) please run 'probepart' or 'fdisk -l' and post the results. The reason is, so we can know with certainty what drives and partitions are what on your computer and how linux sees them.

(2) let me know what kind of install you did. e.g., option 1 or option 2

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

My preference (in your shoes) would be to do an option 2 install on the second drive and let puppy automagically install grub on the master boot record of your active booting drive.

If you want to do it this way, you should boot from the CD disc and choose the 'puppy pfix=ram' (or what ever it is called)

The reason why is because you can't to an option 2 install on a mounted partition, and I'm afraid it would mount automatically, the way I think you have it configured.

You need to learn how grub determines drives and partitions and how linux determines drives and partitions.

There is not a one-to-one relationship in how they do it - not to mention the relationships between dos drive lettering, grub and linux.

It's not hard to learn, don't be afraid to ask. Most contributors really are good guys. Only three of them bite :)

----------
Here is the output from fdisk -l from my computer:

Code: Select all

Disk /dev/hda: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hda1   *           1        2550    20482843+   c  W95 FAT32 (LBA)
/dev/hda2            2551        5100    20482875   83  Linux
/dev/hda3            5101        7650    20482875   83  Linux
/dev/hda4            7651       14593    55769647+   f  W95 Ext'd (LBA)
/dev/hda5            7651       10200    20482843+   b  W95 FAT32
/dev/hda6           10201       10331     1052226   82  Linux swap / Solaris
/dev/hda7           10332       10714     3076416   83  Linux
/dev/hda8           10715       12659    15623181   83  Linux
/dev/hda9           12660       14593    15534823+   b  W95 FAT32

Disk /dev/hdb: 120.0 GB, 120034123776 bytes
255 heads, 63 sectors/track, 14593 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1        2550    20482843+  1c  Hidden W95 FAT32 (LBA)
/dev/hdb2            2551        3890    10763550   83  Linux
/dev/hdb3            3891        5231    10771582+  83  Linux
/dev/hdb4            5232       14593    75200265    f  W95 Ext'd (LBA)
/dev/hdb5            5232        7781    20482843+   b  W95 FAT32
/dev/hdb6            7782       10331    20482843+   b  W95 FAT32
/dev/hdb7           10332       12499    17414428+  1b  Hidden W95 FAT32
/dev/hdb8           12500       14593    16820023+  83  Linux

Disk /dev/hdc: 100.2 GB, 100256292864 bytes
255 heads, 63 sectors/track, 12188 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdc1               1        2509    20153511   1c  Hidden W95 FAT32 (LBA)
/dev/hdc4            2510       12188    77746567+   f  W95 Ext'd (LBA)
/dev/hdc5            2510        4363    14892223+  1b  Hidden W95 FAT32
/dev/hdc6            4364        6471    16932478+  1b  Hidden W95 FAT32
/dev/hdc7            6472        9033    20579233+  1b  Hidden W95 FAT32
/dev/hdc8            9034       10611    12675253+  83  Linux
/dev/hdc9           10612       12188    12667221   83  Linux


As you can see by the above example, nobody could advise me exactly what to do with knowing my hard drive and partition structures.

User avatar
craftybytes
Posts: 298
Joined: Fri 17 Nov 2006, 10:32
Location: QLD AUSTRALIA

#7 Post by craftybytes »

As Bruce B has already reiterated - if you boot up using the Puppy Live CD, then do the GRUB install ..

It's been a while since I had to play around in Windoze but if I remember rightly disk drives are numbered such:

Primary drive = C:\ = partition 1 = 'bootable' partition
D:\ = partition 2 = 'DOS' or 'extended partition
E:\ = partition 3 = 'DOS' or 'extended partition
etc ...

If you have a 2nd disk drive:

Second drive = F:\ = partition 1 = 'DOS' or 'extended' partition
G:\ = partition 2 = 'DOS' or 'extended' partition
etc ..

For Linux - disk numbering is different :

Primary drive = hda
= hda0 = partition 1 = 'ext2' or 'ext3 - 'bootable' partition
= hda1 = partition 2 = 'ext2' or 'ext3' or even 'swap'
= hda2 = partition 3 = 'ext2' or 'ext3' or even 'swap'
etc ..

Second drive = hdb
= hdb0 = partition 1 = 'ext2' or 'ext3'
= hdb1 = partition 2 = 'ext2' or 'ext3'
= hdb2 = partition 3 = 'ext2' or 'ext3'
etc ...

OR as in my case - I dual boot between Win XP & Linux - so when in my linux I see the hard drives as :

Primary drive = hda
= hda0 = Win XP = 'bootable' partition (GRUB installed to "boot" sector)
= hda1 = 'general' storage = 'extended' partition

Second drive = hdb
= hdb0 = MEPIS linux = 'bootable' ext2 partition (linux only)
= hdb1 = 'swap' formatted linux partition
= hdb2 = 'ext2' Puppy partition
= hdb3 = 'ext2' general storage (linux only)

GRUB is installed to the 'boot' sector of the primary drive (Win XP) and on bootup provides a boot menu which gives me a selection of either Win XP or MEPIS or Puppy to start .. This GRUB was automatically loaded by my MEPIS when I installed it - so all I had to do was edit the '/boot/grub/menu.lst' file to add in Puppy for it to boot..

HTH
3 x boot:- ASROCK VIA 'all-in-one' m/b; AMD Duron 1.8Ghz+; 1.0GB RAM; 20GB hdd (WinXP Pro); 80GB hdd (MEPIS 3.4-3/Puppy v2.15CE Frugal); 1GB USB pendrive (Puppy 2.15CE Frugal); CD/DVDRW; 17" LCD monitor; HSF 56k modem... MEPIS is great.. Puppy ROCKS..

tony
Posts: 334
Joined: Sat 14 Jan 2006, 10:52
Location: Montreal.ca

#8 Post by tony »

I would get back to basics and start here :-

http://grub4dos.jot.com/WikiHome

or here :-

http://wellminded.com/puppy/pupsearch.html

I have grub installed on my first hard disk with XP.

On booting I am given a choice of XP or linux. On choosing Linux I get a list of systems installed on the several partitions I have on the second hard disk.

Points to watch with grub is how it defines disks and partitions, they both start at 0.

Also it picks up from the first menu.lst it finds so be careful when deleting partitions to make way for a new install.

Regards Tony

jacatone
Posts: 380
Joined: Mon 26 Feb 2007, 09:16

#9 Post by jacatone »

Thanks so much. You guys are great. I think my problem is I don't have an ext partition on my master HDD. I just have Win98SE installed on my first drive and Puppy installed on the second. Could I just use something like Partition Magic to create a second partition on C drive, or does Puppy have a better program? How large should I make it? Once created, what would I type into the Grub Bootloader Config to install it?

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#10 Post by Flash »

GRUB replaces the Windows boot program in the boot sector (the first sector) of the C:\ drive, which pretty much by definition already exists. You should not need to change anything to install GRUB. I don't know why it wouldn't install. Maybe because you tried to install Puppy to a slave hard drive.

Bruce B

#11 Post by Bruce B »

jacatone wrote:Thanks so much. You guys are great. I think my problem is I don't have an ext partition on my master HDD. I just have Win98SE installed on my first drive and Puppy installed on the second. Could I just use something like Partition Magic to create a second partition on C drive, or does Puppy have a better program? How large should I make it? Once created, what would I type into the Grub Bootloader Config to install it?
(1) with linux you don't need an ext# partition on the first drive, but you do need one somewhere

(2) i think pqmagic is great, but i've found that once it has been used on extended partitions, it is better to continue using it for repartitioning jobs. your mileage may vary.

(3) suppose you do want to use hda for puppy. how large? i don't even know the size of your drive. anywhere from about 500mb and up. my puppy uses a 20gb partition.

(4) the grub install - i can't remember the exact menu sequence and wording - if it were me i'd install it on the mbr of hda1 - everything should go fine

----------

a word for the very cautions - you don't want to lose your mbr on either drive. may i recommend downloading aefdisk and use it to save your mbrs?

in REAL DOS mode type these commands:

aefdisk /save:c:\hda.mbr
aefdisk /save:d:\hda.mbr
aefdisk 2 /save:c:\hdb.mbr
aefdisk 2 /save:d:\hdb.mbr

this way, you have the master boot records for both drives on both drives in the off chance something goes wrong

also you didn't mention a swap partition - make one

pqmagic 8 can make, label and format linux swap, ext2 and ext3 partitions

User avatar
daftdog
Posts: 120
Joined: Thu 22 Jun 2006, 00:47
Location: Western Australia

#12 Post by daftdog »

If I already have Puppy installed on my second slave HDD, shouldn't I install it there?
If you use the 'expert' way to install grub then you can put the grub files on your second HDD (which should already be ext2 if you have puppy on it) and you can write the changes to the Master Boot Record on the windows (first) HDD. This should then give you a choice of booting from either HDD. I have installed puppy on the second HDD of a couple of computers and it has always worked fine for me; windows on the first HDD, puppy on the second HDD and a boot menu that gives you the choice of booting either when you turn on your computer. No need for extra partitions on your windows HDD or your second HDD.

Have you tried installing grub from the Puppy Live CD? Use the 'expert' choice to have more control over the process. If you need help to do this let me know. It is relatively easy. Maybe I should write a How-To.
"We are monkeys with money and guns." Tom Waits

Post Reply