Notes on Frugal Install with Grub and working myDS


Forum: DSL Tips and Tricks
Topic: Notes on Frugal Install with Grub and working myDS
started by: larkl

Posted by larkl on Sep. 19 2005,14:31
Here are my notes from my (finally) successful frugal install with grub bootloader and working (ie- persistent) myDSL apps on a single drive 166 Mhz Dell with 32 M RAM.  Might be of interest to other noobs.  Apologies to clivesay, some is a repeat of your document.  I've included it all for clarity.  

-Download boot floppy image and CD .iso.  Burn these as described elsewhere. You may not need the floppy, I did.
 
-boot onto floppy/CD and enter
>dsl 2
at prompt to boot into text mode.  

-run cfdisk and prepare partitions.  I used:
- /dev/hda1 - 75M for image, set as bootable
- /dev/hda2 - 150M for swap (set type to 82!)
- /dev/hda3 - rest of drive for /home, mydsl, and backup/restore.

-write partitions and exit cfdisk.

-Prepare partitions:

>mke2fs /dev/hda1
>mke2fs /dev/hda3
>mkswap /dev/hda2
>swapon /dev/hda2

-reboot with floppy/CD into level 5 (just let it boot)

-right-click on desktop and select APPS>TOOLS>FRUGAL INSTALL>FRUGAL GRUB INSTALL
at image partition, enter >hda1 (or the appropriate)
at install from, enter> l (that's L for Live CD)
at format question, enter >y

-when install completes, remove floppy/CD and reboot. Select one of the grub menu items.

- Hopefully, now we're successfully running off our HD install.  

-Now, we'll edit the grub menu.  Open a terminal window:
>sudo su
>mount /mnt/hda1
>nano /mnt/hda1/boot/grub/menu.lst  
Comment out the undesired three line sets.  I left only the set labeled "myDSL w/ mydsl, restore, persistency, hostname, & passwords"

I edited the middle line here as follows (your partitions may be different than mine):
>make sure that opt=hda3 home=hda3 mydsl=hda3
>now add dsl in front of mydsl=hda3
the entire line looks like this:


kernel /boot/linux24 root=/dev/hda1 quiet vga=normal noacpi noapm noscsi frugal dma restore=hda3 home=hda3 opt=hda3 host=DSL1 dsl mydsl=hda3

Note that the extensions don't seem to re-install without the dsl in front of mydsl=hda3.

-save, exit and reboot.  

-Hopefully, we successfully rebooted.  

-Now we'll create the folder for optional myDSL extensions.  These will NOT automatically install, but will be options on the myDSL (right-click) menu.
Open a terminal window.
>sudo /mount/hda3
>sudo mkdir /mnt/hda3/optional
>sudo chown dsl /mnt/hda3/optional
Close the window.  

-Now to install extensions.  This is what works for me, there may be better ways.  I install each to /tmp.  Then if I want it to be optional (not installed, but available), I move it to /mnt/hda3/optional.  If I want it to install automatically, I move it to /mnt/hda3.  I do this manually after mounting hda3 first.  

- Hope this helps. enjoy!

Posted by AwPhuch on Sep. 19 2005,16:52
WOW!!!

Excellent post...This is exaclty how I did mine too

I dont use restore since the /home dir is now a persistant or permanently written to hd, and you dont need to backup something that is written to the HD

My frugal runs very very well on a 133Mhz Compaq LTE 5300 with 32Meg RAM, I kicked up the swap to 128Megs...

You probably dont need more than 55-60Meg for your frugal "disk image" partition

P.S. The grub bootloader was soo much easier to modify than lilo

Brian
AwPhuch

Posted by Goober on Oct. 06 2005,22:09
Ok, i tried the first bit, I typed in "dsl 2", it loads, everything seems fine, then it gets to "Call Trace:    [<c01308180>] . . . ", with a whole bunch more of thosde funny square brackets around it.

Any suggestions?  And i apologize if I am bumping an old thread.

Posted by s_t_bris on Oct. 06 2005,23:13
I got it working in a slightly different way, using existing grub (modiying the .conf file) from existing Fedora installation, and copying cd contents to hdb1 (partition on added HD). I couldn't use the install script cause it only works to hda.

Boot process works fine, but it spends a while, just after the big DSL logo, looking for the CDROM. Anyway to get rid of this as it wastes a bit of time?

Here is the bottom half of my grub.conf file:

title Fedora Core (2.6.11-1.1369_FC4)
root (hd0,0)
kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.11-1.1369_FC4.img

title DSL-frugal-base-norestore (hdb1)
root (hd1,0)
kernel /boot/isolinux/linux24 root=/dev/hdb1 base norestore
initrd /boot/isolinux/minirt24.gz

title DSL-frugal-toram-mydsl-restore (hdb2)
root (hd1,0)
kernel /boot/isolinux/linux24 root=/dev/hdb2 toram mydsl=hdb2 restore=hdb2
initrd /boot/isolinux/minirt24.gz

Thanks for any suggestions on getting rid of that wait time.  :D


ps. AwPhuch, if your backing up other files too (such as a XF86Config-4 file), you still need to backup and not just use a persistent home. Thanks to the OP though, I didn't realise that the persistent home to HD thing existed!

Posted by AwPhuch on Oct. 07 2005,15:40
Quote (s_t_bris @ Oct. 06 2005,19:13)
I got it working in a slightly different way, using existing grub (modiying the .conf file) from existing Fedora installation, and copying cd contents to hdb1 (partition on added HD). I couldn't use the install script cause it only works to hda.

Boot process works fine, but it spends a while, just after the big DSL logo, looking for the CDROM. Anyway to get rid of this as it wastes a bit of time?

Here is the bottom half of my grub.conf file:

title Fedora Core (2.6.11-1.1369_FC4)
root (hd0,0)
kernel /boot/vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ rhgb quiet
initrd /boot/initrd-2.6.11-1.1369_FC4.img

title DSL-frugal-base-norestore (hdb1)
root (hd1,0)
kernel /boot/isolinux/linux24 root=/dev/hdb1 base norestore
initrd /boot/isolinux/minirt24.gz

title DSL-frugal-toram-mydsl-restore (hdb2)
root (hd1,0)
kernel /boot/isolinux/linux24 root=/dev/hdb2 toram mydsl=hdb2 restore=hdb2
initrd /boot/isolinux/minirt24.gz

Thanks for any suggestions on getting rid of that wait time.  :D


ps. AwPhuch, if your backing up other files too (such as a XF86Config-4 file), you still need to backup and not just use a persistent home. Thanks to the OP though, I didn't realise that the persistent home to HD thing existed!

Yah I realized that afterwards...if you make changes in something that isnt in the /home or /opt (persistant) directories..then you need to back them up..just remove anything of reference of the /opt or /home or it will overwrite any changes that you make  (learned the hard way! DOH!)

Brian
AwPhuch

Posted by QBRADQ on Oct. 14 2005,14:29
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

Posted by robh on Oct. 21 2005,03: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).

Posted by iakudi on Oct. 21 2005,04: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?)

Posted by AwPhuch on Oct. 21 2005,15:49
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

Posted by AwPhuch on Oct. 21 2005,15:51
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

Posted by robh on Oct. 22 2005,12:57
Quote (AwPhuch @ Oct. 21 2005,11:51)
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

i thought i had mounted it, but clearly i was being dumb and had not done so.

any hoo, i've now changed my grub boot loader menu.lst file to the following

>kernel /boot/linux24 fromhd=/dev/hda1 quiet vga=789 noacpi noapm nodma noscsi frugal home=hda3 opt=hda3 dsl mydsl=hda3 restore=hda3
>initrd /boot/minirt24.gz

everything seemed to go ok, so i tested the persistence by downloading and installing xchat via mydsl. installed it, copied it to my /mnt/hda3/home/dsl file and rebooted.

on restart the xchat icon is gone aswell as the /home/dsl file in hda3?

could you let me know if you can see any glaring errors pls

ps
hda1=image 256MB
hda2=swap 128MB
hda3=rest of hd ~2.8GB

Posted by robh on Oct. 22 2005,13:09
scratch that, i haven't lost the home/dsl file but the installed apps are not persistent...:p
Posted by mikshaw on Oct. 22 2005,15:34
Applications do not remain installed in a frugal or liveCD setup, although any configuration files created in /home/dsl by the apps will be backed up and restored.  You'll need to put the mydsl package in the root of hda3 so it can be reinstalled the next time you start up.
Posted by N0ne on Oct. 28 2005,13:04
Hello and thanks for this wiki.
I follow and got a "Missing operating system" at reboot.

After the installation I edit my menu.lst and my device.map.
Did I forgot something.  Thanks.  :(


EDIT : all works now.  :)
I reinstall grub with a good device.map + all *stage* file from another grub installation.  Then I re-install my grub and ajust my menu.list

Posted by ergouser on Oct. 30 2005,14:02
I did the following to get rid of a "GRUB Hard Disk Error".  I need to boot a system that has the CF as the Secondary drive (/dev/hdc).  On the DSL system, the CF/PCMCIA slot is /dev/hde.

If you right-click and do a Frugal Grub Install to /dev/hde.  (If you take this flash and boot it in the target, you get the error in the title "GRUB Hard Disk Error" at boot up.)

Remount the CF eg on /mnt/hde1

Edit the file /mnt/hde1/boot/grub/device.map so that has one line (you could probably put others, but I didn't try):

(hd0) /dev/hde

now:

grub-install --root-directory=/mnt/hde1 /dev/hde

now re-edit the device.map file:

(hd0) /dev/hdc

unmount, etc. etc.

In my case (YMMV) the CF boots in the target system.

I know almost nothing about grub, so this discovery was just luck.  I don't know why it works, or under what other situations it works.  If there's a grub expert out there who would like to expose my total ignorance and show a better way, I'd like to hear about it.

Powered by Ikonboard 3.1.2a
Ikonboard © 2001 Jarvis Entertainment Group, Inc.