DSL Tips and Tricks :: Notes on Frugal Install with Grub and working myDS



Wow, wish I would have seen this post yesterday :P

I just got my frugal HD install working today, and my main hang up was GRUB. Here's the problem I faced:

The GRUB device map was getting all out of wack. On my system, my ATA 133 card gets assigned hda - hdd, and my on-board IDEs get hde - hdh. However, in BIOS (and in GRUB), the on-board IDEs are (hd0) - (hd3) and the ATA 133 card is (hd4) - (hd7).

When the frugal install script called GRUB to build the device map, this is what it came up with (NOTE: the comments are mine, not GRUB's, and do not appear in the actual device.map):
Code Sample

(hd0) /dev/hda # This is my large disk on ATA0-M (NTFS)
(hd1) /dev/hdb # Does not exist!
(hd2) /dev/hdc # Does not exist!
(hd3) /dev/hdd # Does not exits!
(hd4) /dev/hde # Linux System Disk (ext2, ext3, and 0x82)
(hd5) /dev/hdf # Windows Application Disk (NTFS)


When installed like this, booting GRUB results in:
Code Sample

GRUB
Hard Disk Error


Oddly enough, a manual GRUB install from a GRUB boot CD (those 500k wounders :P) using the same device.map results in "GRUB " being printed out to the BIOS console about a billion times.

The Fix:

New /boot/grub/device.map (root mounted at /mnt/hde1):
Code Sample

(hd0) /dev/hde
(hd1) /dev/hdf
(hd2) /dev/hdg
(hd5) /dev/hda


Note that only (hd0) is really needed to boot, but I have many other operatting systems installed and use GRUB to boot them either directly or indirectly.

Now, after re-writting /boot/grub/device.map, I had to re-install GRUB. I tried using the command "grub-install '(hd0)'" (NOTE that grub-install requires single quotes around device names, which isn't documented in the --help command). However, when using that command, I get an error saying something like "/dev/cloop has no BIOS device name!".

So, in order to re-install GRUB I had to use the GRUB shell, with a few tweaks. Here's a falsy console dump of the process (I.E., I'm writting it by hand from memory, milage may vary):
Code Sample

// This tells GRUB to use this particular device.map instead of making a new one
> sudo grub --device-map=/mnt/hde1/boot/grub/device.map
// And this tells GRUB to use /dev/hde1 as the root
// This is because (hd0) in our device map points at /dev/hde
> GRUB> root (hd0,0)
// And again, this installs GRUB to the MBR of /dev/hde
> GRUB> setup (hd0)
// This is just a place holder for all the info GRUB spits out after setup
> GRUB> BUNCH OF GRUB STUFF
// Quit GRUB
> GRUB> quit
// Reboot and pray :P


So, now we've got GRUB set up right! We can boot now, right? Well, if you're DSL Frugal experiance has been anything like mine, then no. The file /boot/grub/menu.lst that the frugal install script installs is missing a very important line from it's entries, the root command!

I'm at the office right now, so I don't have access to my menu.lst, so I'll be using one of the entries submitted further up as the example.

Code Sample

// menu.lst entry generated by DSL Frugal Install Script
// Note the absence of the root command
// This causes a kernel panic (for me at least)
title DSL-frugal-base-norestore (hdb1)
kernel /boot/isolinux/linux24 root=/dev/hdb1 base norestore
initrd /boot/isolinux/minirt24.gz

// Corrected menu.lst entry
// This boots fine
title DSL-frugal-base-norestore (hdb1)
root (hd1,0) // ADDED
kernel /boot/isolinux/linux24 root=/dev/hdb1 base norestore
initrd /boot/isolinux/minirt24.gz


Well, I hope all this helps someone out there. It's been a frustrating couple days having to use a GRUB boot CD to load Windows from a secondary disk through the GRUB shell. But hey, that's what it's there for, eh? map() roxor :D

What about the Twinky?
QBRADQ

hey larkl

great post about the frugal install, which i am trying to follow. sorry to post such a noob question but, i'm having trouble with altering the /boot/grub/menu.lst file.

i did the command

>nano /mnt/hda1/boot/grub/menu.lst  

and got a bash terminal with the above file highlighted in it but i cannot seem to see the file. i tried the ctrlR to read and ctrlO to write out the file but can't see the file contents anywhere. how do i edit this file (utter noob instructions would help).

This set up worked great for e too, especialy after all tge posts and countless re-installs !!

There is just 1 question, my /tmp file is still linked to /hda1 and so when I try to install something it runs out space and cannot download it or if it downloads it cannot install it.....

I just want to install Opera and another editor such as Gedit or Kwrite - something very "notepaddy" other than beaver (any recommendations?)

Quote (iakudi @ Oct. 21 2005,00:29)
This set up worked great for e too, especialy after all tge posts and countless re-installs !!

There is just 1 question, my /tmp file is still linked to /hda1 and so when I try to install something it runs out space and cannot download it or if it downloads it cannot install it.....

I just want to install Opera and another editor such as Gedit or Kwrite - something very "notepaddy" other than beaver (any recommendations?)

Change your download directory...if you are using persistand /home and /opt directories then aim it at /home/dsl/tmp (well create the temp dir first)

Brian
AwPhuch

Quote (robh @ Oct. 20 2005,23:26)
hey larkl

great post about the frugal install, which i am trying to follow. sorry to post such a noob question but, i'm having trouble with altering the /boot/grub/menu.lst file.

i did the command

>nano /mnt/hda1/boot/grub/menu.lst  

and got a bash terminal with the above file highlighted in it but i cannot seem to see the file. i tried the ctrlR to read and ctrlO to write out the file but can't see the file contents anywhere. how do i edit this file (utter noob instructions would help).

You have to mount the "bootable" partition b4 editing...

If yours is /hda1 then mount it 1st..then edit..once its edited then you are good to go

Brian
AwPhuch

Next Page...
original here.