I-Appliance BBS
The Official Source for Internet Appliance Upgrades and Mods
Amazon Honor System Click Here to Pay Learn More
BBS Main List | Sign In | Sign Up | Search | Help | Linux-Hacker.netReply to Thread | Printer |

Home / Other I-Appliances / MSN Companion
Grub Install - Step by Step
Rasmus' linux3 installed, no Windows or Dos.

New MessageGrub Install - Step by Step (modified 2 times) daybird
Profile
A quick summary of my experience hacking the i-a1.
The main point: you _can_ install rasmus' linux-3 image on an
external flash card, make it bootable with grub, boot the i-a1 w
ith it, change a few settings and copy it straight over to the
internal flash card. No need for Windows or Dos, just another
linux box that has some way of reading a cf card.

Acknowledgements: nearly all of this info is cobbled together
from other people's advice on the message boards - especially
that of johnmeacham (on using grub to make the card bootable)
/http://www.kenseglerdesigns.com/cgi-bin/UltraBoard/UltraBoard.pl?Action=ShowPost=MSNCompanion=99&Idle=0&Sort=0&Order=Descend&Page=2&Session=

What you will need:
a 16 meg compact flash card
some way of reading it on a linux machine
(I used a free Lexar jumpshot cable with success - make sure
usb mass storage is in your kernel)
rasmus' linux-3 image (http://php2.chek.com/~rasmus/)
a working copy of grub (www.gnu.org) - the linux machine doesn't
need to boot from it, just needs it installed)

1. Copy Rasmus' image to the cf card. My card attaches at /dev/sdb.
Yours may turn up elsewhere, so modify the following accordingly.

dd if=linux-3.img of=/dev/sdb

2. Mount the card's first partition (the ext2 one)

mount /dev/sdb1 /mnt/jumpshot

3. Clear a little space on the partition so grub can do its stuff.
You don't need all the modules in /boot/modules figure out what you
can do without and rm it. You do not, for instance, need both usb
ethernet adapter modules. You can also remove all lilo's boot* files,
map and chain from /boot. Needless to say, before you do this, make
quite sure you're not sitting on your machine's _actual_ boot directory.

4. Use "grub-install" to make the card bootable. Follow the directions
in johnmeacham's post on this board (see link above). Briefly:
grub-install --root-device=/mnt/jumpshot /dev/sdb
pico /mnt/jumpshot/boot/grub/device.map
[edit this file so the only entry is this line:
hd0 /dev/sdb
(or whatever device corresponds to your cf)]
grub-install --root-device=/mnt/jumpshot /dev/sdb

If grub-install fails, you'll have to clear out a little more space.
If you really can't lose any more modules, you'll have to figure out
how to take something from another (cramfs) partition, resize it,
then grow this one (i.e. not so easy!). Bear in mind that you can
get rid of some of grub's files once you're booting comfortably,
so you should be able to add some things back in later.

5. Add a boot menu for grub:
pico /mnt/jumpshot/boot/grub/menu.lst ### that's lst as in "list", not as in 1st
Put the following in this file:

default 0
timeout 10

##Boot options for the external flash
title=Jailbait Linux v.6.1 (external flash)
root (hd0,0)
kernel /boot/vmlinuz-2.4.17ia root=/dev/hdc1 append="devfs=mount"

##Boot options for the internal flash. On the internal /boot/grub/menu.lst,
##the second line here will be
##root (hd0,0) - i.e. these two menu options should be switched.
##We include this option here because it
##lets us boot from the internal flash without removing the bootable external card.
title=Jailbait Linux v.6.1 (internal flash)
root (hd0,1)
kernel /boot/vmlinuz-2.4.17ia root=/dev/hda1 append="devfs=mount"

6. Now we need to change a few settings to let this image boot from the external
flash - it's set up for the internal one at the moment.
i. edit /mnt/jumpshot/etc/fstab: replace all occurences of "dev/hda" with "dev/hdc"
ii. edit /mnt/jumpshot/etc/init.d/ramdisk: replace "dev/hda" with "dev/hdc". Then,
in the four "mknod" lines, replace the 3 with 22 - i.e.
mknod /dev/hdc5 b 22 5
...
7. Unmount your cf card and stick it in the i-a1. Assuming you've been
able to reset the bios to boot first from the external drive, it should now
boot from your card. You'll see the grub boot menu (hit return or wait the
ten secs), and then Jailbait will load. Configure it to your liking: if you
need to change something after the welcome script runs, you'll probably want
to remount the root filesystem as read-write:
mount / -o remount,rw
Make sure the apps all work OK (i.e. you didn't dump _too_ much stuff from boot!).

8. Now you can copy the installation over to the internal flash:
dd if=/dev/hdc of=/dev/hda
If the operation runs out of space (as it did for me), you'll probably still be OK.

9. Mount the internal flash and reverse all the steps in #6 above. Change
hdc to hda and so on. You'll need to use vi to do this:

mount /dev/hda1 /mnt
vi /mnt/etc/fstab
vi /mnt/etc/init.d/ramdisk

You should also edit the grub menu.lst that was copied over (vi /mnt/boot/grub/menu.lst):

default 0
timeout 10

##Boot options for the internal flash
title=Jailbait Linux v.6.1 (internal flash)
root (hd0,0)
kernel /boot/vmlinuz-2.4.17ia root=/dev/hda1 append="devfs=mount"

10. That's about it. You're now ready to boot rasmus' ipaq Jailbait again,
this time from the internal drive. Thanks again to John Meacham and, of course,
Rasmus for doing all the real work.

01-07-2002 00:27:31

New MessageRE:Grub Install - Step by Step (modified 0 times) tedium
Profile
I would really like to try this, but my PCMCIA-enabled Linux box is unable to run grub (unless I were to install a new Linux distribution). Is it possible to do something analogous with LILO instead?
01-08-2002 18:31:53

Reply to Thread | Printer |
All times are PSTPowered by UltraBoard v1.62



Copyright © 2000, Netmake Inc. All Rights Reserved.
See Terms and Conditions for more information.




i-opener opener laptop notebook computer help drivers dll free windows dos repair fix linux mac macintosh 2000 95 98 nt pc configure hardware software sound video netscape explorer network networking lan wan software cmos fat bios printer card mouse modem ide scsi cd rom controllers scanner tape hard drive cgi scripts source code mp3