re: grub from the ground up

How to do things, solutions, recipes, tutorials
Message
Author
muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

re: grub from the ground up

#1 Post by muggins »

quite a few people seem to experience difficulties with grub. i just stumbled upon this little guide, and it seems quite clear, simple and short.

http://www.troubleshooters.com/linux/grub/grub.htm

Q
Posts: 61
Joined: Mon 10 Jul 2006, 14:19

#2 Post by Q »

not so clear when it comes to booting from pen drive if the bios doesn't support it.
I know there is a wakeup usb on a floppy but if the machine doesn't have one how do you boot it?

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#3 Post by muggins »

boot managers will only boot devices supported as bootable by the bios. so if your bios doesn't support usb booting, grub can't either.

if you don't have floppy drive to use wakepup, you can either try making a boot cdrom with wakepup on it, or use some secondary method to boot puppy from your hard disk.

i think i've seen a few posts regarding a wakepup cdrom, (but can't remember where)...or you can have a look at ultimatebootcd.com & check out their tutorial on including any bootdisk floppy in the bootcd.

it's been several years since i had winME on my hdisk & used tiny.exe, (from gujin boot manager), as an entry in autoexec.bat to boot a usbkey, but you can bootstrap a usbkey using similar methods.

User avatar
willhunt
Posts: 495
Joined: Wed 05 Oct 2005, 18:19

what about this smart boot manager

#4 Post by willhunt »

I've used smart boot manger it seems to let you boot from a toster even :shock:

User avatar
richard.a
Posts: 513
Joined: Tue 15 Aug 2006, 08:00
Location: Adelaide, South Australia

#5 Post by richard.a »

muggins wrote:if you don't have floppy drive to use wakepup, you can either try making a boot cdrom with wakepup on it, or use some secondary method to boot puppy from your hard disk.
I've created a number of bootable CD-ROMs with useful applications on them, like partition magic, ghost, etc, at different times.

I think I probably created those ones in Nero (would have been Nero 5 I suspect).

I was prompted to insert the bootable floppy of my choice into the floppy drive so the program could locate and copy the files needed for booting.

I have a feeling that I've done similar things in K3B.


When creating self-booting restore partition CDs in Ghost, they do the same thing.

Hope these thoughts are useful.

Richard in Australia

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#6 Post by muggins »

richard,

i recommend ultimatebootcd as a good tool to have in your toolbox as it's got dos boot floppies, several linux boot floppies, smart boot manager, grub, programs to wipe hard disks, diagnostic progs etc. the full edition comes with the dsl based distro, insert, but you can easily replace that with puppy by doctoring the appropriate boot menu to point at puppy. they've also got a thread, on their website about combining ultimatebootcd with the windows version, but i've never tried that as you need the evil HeXP in order to do it.

and if you've got any snazzy program based on a bootfloppy, you can include that as well.

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#7 Post by Sit Heel Speak »

muggins wrote:boot managers will only boot devices supported as bootable by the bios.
You are mistaken.

Linld, in WakePup 1.1C can boot Puppy 1.xx from USB stick on the USB 1.1 port on a laptop with no BIOS USB boot capability. WakePup 2-02 can boot Puppy 2.xx from USB stick on a USB 2 port, either directly (on my tower homebuilt, with the USB 2 port in front, which does have the boot-from-USB-in-BIOS capability but I don't have it switched on) or through a PCMCIA USB adapter (on my old laptop, which does not have boot-USB capability in BIOS).

Grub.exe can also boot Puppy 1.08 on a USB stick on my laptop's USB 1.1 port, provided these lines are in config.sys:

dos=high,umb,noauto
device=C:\WINDOWS\himem.sys /testmem:off /v
device=c:\windows\ifshlp.sys
rem load Panasonic v2.20 ASPI manager for USB mass storage
rem (maps USB mass storage devices to ASPI devices)
device=c:\utils\USBASPI.SYS /e /o /u /v /w /slow
rem load Adaptec v4.01b ASPI disk driver
rem (maps ASPI mass storage devices to DOS drive letters)
device=c:\utils\ASPIDISK.SYS

and USBASPI.SYS and ASPIDISK.SYS (copied from the WakePup floppy) are in c:\utils.

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#8 Post by muggins »

well done sit,

you got me on a technicality! (although i think i said more or less the same thing:
it's been several years since i had winME on my hdisk & used tiny.exe, (from gujin boot manager), as an entry in autoexec.bat to boot a usbkey, but you can bootstrap a usbkey using similar methods.
is it just my imagination, or is the forum becoming quite niggly? maybe it's those westerly winds my high school head warned about.

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#9 Post by Sit Heel Speak »

Do you see how to proceed, Q? If you can't boot directly from the USB stick, then put either linld.com (from wakepup) or grub.exe (from the live CD, or downloaded from the Web) on hard disk, in your autoexec.bat, with the ASPI drivers from wakepup in config.sys. Depending on Puppy version an additional tweak to initrd.gz may be necessary. This tweak has evolved over the last few months and changed with each Puppy version. Tell me what Puppy version you are trying and I'll tell you which initrd.gz tweak you need.

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#10 Post by Sit Heel Speak »

Except, I still haven't succeeded in making Puppies 2.02 and onward boot from a USB stick (edited; I now have succeeded in booting 2.10-seamonkey (final) using wakepup2-02, slightly modified; see my post at

http://www.murga.org/~puppy/viewtopic.p ... 6&start=16

).

Increasing niggliness partly perhaps stems from the fast pace of change recently in Puppy. Many statements about Puppy that were unqualifiedly true in July are only qualifiedly true now.
Last edited by Sit Heel Speak on Wed 20 Sep 2006, 05:26, edited 1 time in total.

muggins
Posts: 6724
Joined: Fri 20 Jan 2006, 10:44
Location: hobart

#11 Post by muggins »

hi sit,

in retrospect i was probably overly niggly, as your response was more aimed at resolving Q's query.

my response was perhaps too terse. sometimes i post too quickly, also, as expressed by marksouth elsewhere, there do seem to be questions asked a lot that have been covered elsewhere.

anyway, changing subject, i can't wait to try out barry's latest effort.

regards,
muggins

Q
Posts: 61
Joined: Mon 10 Jul 2006, 14:19

#12 Post by Q »

Sit Heel Speak wrote: Grub.exe can also boot Puppy 1.08 on a USB stick on my laptop's USB 1.1 port.....
Thanks bud for the detailed reply but booting puppy2 on a stick from dos wasn't a problem for me and its the same (almost ) like the way you posted the problem is getting grub to do it.
-can you please post your grub lines
it can't identify root (hd1,0) which is supposed to be sda1. tried map with different combinations but nothing worked.

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#13 Post by Sit Heel Speak »

Q wrote:...booting puppy2 on a stick from dos wasn't a problem for me...its the same (almost ) like the way you posted...the problem is getting grub to do it...can you please post your grub lines
Tell me exactly which Puppy version number, and are you booting through a 1.1 or 2.0 USB port? I've developed eight distinct menu.lst's since April, for various Puppy versions booted through the 1.1 and 2.0 ports. I only use three of them anymore, so will have to experiment and create or recreate others than I now use, if yours is different.

Q
Posts: 61
Joined: Mon 10 Jul 2006, 14:19

#14 Post by Q »

Sit Heel Speak wrote: Tell me exactly which Puppy version number, and are you booting through a 1.1 or 2.0 USB port? I've developed eight distinct menu.lst's since April, for various Puppy versions booted through the 1.1 and 2.0 ports. I only use three of them anymore, so will have to experiment and create or recreate others than I now use, if yours is different.
sorry for the late response friend i was away for few days.
I'm using 2 versions on 2 pen drives :
1- puppy 1.09cr
2-puppy2.01r2 with firefox.

booting from both 1.1 and 2.0 ports.


side note :

I would like to thank BarryK and each and everyone who works on developing puppylinux,as most of you know that in most airports in USA they prohibited laptops and other electronics on board and thats when puppy on a stick came in very handy for my work related trips to various cities ,now puppy will attract few more users who were really impressed by it but hesitant because of the level of encryption and its like magic I found a topic about that.
Thanks BarryK and all the hard working guys who do it just for the love of coding and helping.

User avatar
richard.a
Posts: 513
Joined: Tue 15 Aug 2006, 08:00
Location: Adelaide, South Australia

#15 Post by richard.a »

Q wrote:Thanks BarryK and all the hard working guys who do it just for the love of coding and helping.
Amen!
[i]Have you noticed editing is always needed for the inevitable typos that weren't there when you hit the "post" button?[/i]

[img]http://micro-hard.dreamhosters.com/416434.png[/img]

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#16 Post by Sit Heel Speak »

Hang on, I'll get it posted about 12 hours from now.

User avatar
Sit Heel Speak
Posts: 2595
Joined: Fri 31 Mar 2006, 03:22
Location: downwind

#17 Post by Sit Heel Speak »

As mentioned earlier, I have not succeeded yet in getting Puppy 2 to boot using grub.exe. However, it just dawned on me, one combination I hadn't tried before. So I will try it and if successful report it here tonight (LATER: nope, that didn't work either).

As for Puppy 1.09CE, this is what I use for Puppy 1.08. I presume it will also work on Puppy 1.09CE:

config.sys menus:

[menu]
menuitem=PUPPY108FLASH, Puppy 108r1 from USB flash key.
menuitem=CD, Start computer (Win 98SE) with CD-ROM support.
menuitem=NOCD, Start computer (Wwithout CD-ROM support.
menuitem=HELP, View the Help file.
menudefault=CD,3
menucolor=7,0

and then further down in config.sys:

[PUPPY108FLASH]
dos=high,umb,noauto
device=C:\WINDOWS\himem.sys /testmem:off /v
device=c:\windows\ifshlp.sys
rem load Panasonic v2.20 ASPI manager for USB mass storage
rem (maps USB mass storage devices to ASPI devices)
device=c:\utils\USBASPI.SYS /e /o /u /v /w /slow
rem load Adaptec v4.01b ASPI disk driver
rem (maps ASPI mass storage devices to DOS drive letters)
device=c:\utils\ASPIDISK.SYS

...there is no [Common] section in my config.sys.

autoexec.bat lines:

IF %CONFIG%==PUPPY108FLASH goto P108FLAS
GOTO WIN98

:P108FLAS
break on
c:\grub.exe --config-file=(hd0,0)/p108flas/grub/menu.lst
goto theend


c:\p108flas contains vmlinuz and image.gz.

c:\p108flas\grub\menu.lst:

timeout 0
title Puppy 1.08r1 on USB key loaded by Grub.exe from hard disk
rootnoverify (hd0,0)
kernel (hd0,0)/p108flas/vmlinuz root=/dev/ram0 PHOME=sda1 PSLEEP=25 PFILE=pup100-none-262144
initrd (hd0,0)/p108flas/image.gz
boot

I know this is not an ideal solution, since you are still loading vmlinuz and image.gz from the hard disk, not the USB key. You are, however, loading the two big files usr_cram.fs and pup100 from the flash key, so your data is truly portable.

Q
Posts: 61
Joined: Mon 10 Jul 2006, 14:19

#18 Post by Q »

please don't take it the wrong way friend ,its not that I don't appreciate your help but what you posted is not what i was hoping to find answer to.
I thought you came up with a way to make grub identify the USB even though the bios can't boot from it.
I can boot puppy from the flashdrive using linld with all the files on that drive but i have to use a bootable cd with USB support or a floppy which most computers no longer have.
Thanks anyway for your reply.

By the way I wish BarryK can somehow finds a way to have them small versions (50MB or so ) on a business card cd with the ability to save the sfs to flashdrive,that would be extremely convenient for those who use it on the road.

User avatar
Fossil
Posts: 1157
Joined: Tue 13 Dec 2005, 21:36
Location: Gloucestershire, UK.

#19 Post by Fossil »

Q,

Is this of any use?
http://www.murga.org/~puppy/viewtopic.p ... bfbac76370

I'm booting Puppy 1.09CE via grub, and running completely off a USB stick - no CD, no floppy.

Good luck.

Q
Posts: 61
Joined: Mon 10 Jul 2006, 14:19

#20 Post by Q »

Fossil wrote:Q,

Is this of any use?
http://www.murga.org/~puppy/viewtopic.p ... bfbac76370

I'm booting Puppy 1.09CE via grub, and running completely off a USB stick - no CD, no floppy.

Good luck.
Thanks Fossil for the suggestion but the problem still the same and basically its the same what Sit Heel Speak posted.you said completely off a USB stick you still got to start grub from hdd .

linld or loadlin or even tiny can boot from usb when you specify [sdaX..whatever] the question is what to write in grub ???!!
root (what is it for sda1??!!)
try it on a system that can boot from usb but use grub and if you put:
root (hd1,0)
or even (hd1,1,a)
it will find it but in a system that can't boot from usb it will tell it can't find the drive or partition.

btw guys while searching for a way to boot from usb i found ISOemu:
http://www.supinfo-projects.com/en/2005 ... ulti_os/2/
this is really handy for booting iso from dos or nt file system.that is so neat.

Post Reply