To make the subject less boring I tell you my nightmare instead.
It concerns a JL moderator walking angrily towards me, holding the two most lethal booting weapons pointing to my head, on his right hand a Linux Live CD and on the left a Grub floppy, shouting
“You have been with JustLinux Forum for 1.5 year, What have you learned?”
I murmured "Just booting tips"
Below is the confession he made me to sign.
Note : Many moderators taught me a lot of Linux here. That is why they are mentioned first. In real life they are always kind and patient with me. To tackle booting problems one needs tools and the above two lethal weapons are all I use in Linux.
-----edited 15/2/06 Task J3 added------------------------
-----edited 24/2/07 Task B3, B4 & B5 edited, B6 added some tips transferred to Post #3 to ease space-----
-----edited 15/4/07 Task B7 added for restoring Vista MBR --------------
-----edited 16/9/07 A warning added on the change of device names----------
-----edited 21/10/07 Task J4 added showing a Grub prompt otainable from certain Linux/Solaris CD/DVD----------
-----edited 3/11/07 Task E5 added showing how to use Vista to boot Linux----------------
Please note working with boot loaders in Linux requires root privileges. This can be obtained by
(1) log in as root (for Slax, Fedora, Mandriva etc),
(2) log in as default user, then issue "su" at terminal followed by root password (for Suse, Knoppix etc) or
(3) log in as default user and preceed every system-related command with "sudo" (for Deibian, Ubuntu etc).
(4) Kernel 2.6.20 and newer cease to support Pata disk device names like hda, hdb, hdc and hdd. All SCSI/Pata/Sata/USB disks are all called sda, sdb, sdc, sdd, sde, sdf, etc. Please be aware and make suitable adjustment to suit your circumstance.
Task A : Tasks one can perform with a bootable Grub floppy, Grub CD or Grub prompt
Note : A Grub floppy or a Grub CD can be created unattached to an operating system. A Grub prompt is running Grub before a Linux is loaded. At this stage Grub is capable of booting any PC system.
To make obtain a Grub floppy -- Following Chapter 3.1 of the Grub Manual (http://www.gnu.org/software/grub/manual/grub.html) or Chapter 4 of "Linux in a Nutshell" Siever, Figgins and Webbers".
For making a Grub CD -- Follow Chapter 3.4 of the Grub Manual (http://www.gnu.org/software/grub/manual/grub.html). See also Task J3 for additional details.
If you do not have an installed Linux to obtain the required stage1 and stage2 files for making Grub floppy or Grub CD you can "source" these files from any Linux Live CD that has Grub inside. Suitable Live CDs are Mepis, Ubuntu, Puppy, Damn Small Linux, Kanotix, Knoppix.......
For obtaining a Grub prompt see Task J for alternatives
A1: To find out partitioning scheme of 1st bootable disk
Note : For 2nd, 3rd and 4 disk use disk designations (hd1), (hd2) and (hd3) respectively (Grub counts from 0)
geometry (hd0)
A2: Ask Grub to report any partition that has Grub inside
Note : /boot/grub is the designated location for storing Grub’s menu.lst
find /boot/grub/menu.lst
A3: Ask Grub to report a partition that has Lilo inside
Note : /etc/lilo.conf is the designated Lilo’s configuration file
find /etc/lilo.conf
A4: To display Grub's configuration in partition hda8
Note : One can follow the displayed instructions on the screen, line by line, to boot up the Linux manually (partition hda8 is just an example)
cat (hd0,7)/boot/grub/menu.lst
A5: To display Lilo’s configuration in partition hda8
Note : One can follow the Lilo instructions and pick out the relevant information for Grub to boot up the Linux manually
cat (hd0,7)/etc/lilo.conf
A6: To boot a Linux in hda8 with a workable Grub menu.lst
Note : The Linux will boot if its /boot/grub/menu.lst is in working order
configfile (hd0,7)/boot/grub/menu.lst
A7: Use Grub data in partition (hda,6) to setup Grub boot loader in MBR
Note : For the last line "setup (fd0)" will make Grub go to a bootable floppy (fd0) and "setup (hd0,5)" will make Grub go inside the root partition (hd0,5). For Grub going to MBR of 1st boot Sata disk use the same "setup (hd0)".
root (hd0,5)
setup (hd0)
Task B : To restore the MBR of Dos, Windows (Win9x, Win2k, XP and Vista), Lilo or Grub
Note : The MBR is the first 512 bytes of the first bootable disk. It is read by the BIOS when the machine is powered up. A boot loader installed there controls which system is to be booted next. A boot loader is rarely deleted. It is often overwritten by another boot loader with special commands which are described below. (A boot loader is not part of the filing system and so cannot be get rid of by the format command)
B1: To restore Dos/Windows MBR with a bootable floppy
Note : MS systems have a common MBR and XP/Win2k MBR can also be restored by a Dos floppy. A bootable Dos floppy needs "fdisk.exe" inside.
fdisk /mbr
B2: To restore Dos/Windows MBR with an installation CD
Note : MS systems have a common MBR. A Dos-based system's MBR can also be restored by a NT version Windows installation CD. Any Win2k or XP installation CD will do the job. Just boot up the installation CD, choose recovery console and type the command below.
fixmbr
B3: To restore Lilo from Linux partition hda4 into MBR by Live CD
Note : As an example hda4 being the Linux’s root partition. This method requires a Live CD. Normally any Live CD will do.
mkdir /mnt/temp
mount /dev/hda4 /mnt/temp
chroot /mnt/temp
lilo –b /dev/hda
exit
reboot
B4: To restore Grub from Linux partition hda4 into MBR by Grub floppy
Note : The Grub floppy boots to a Grub prompt. Can be done equally with a Live CD with a Grub inside, by invoking a Grub shell (just type "grub" at root terminal).
root (hd0,3)
setup (hd0)
Your Linux will boot now if you issue commands
chainloader +1
boot
B5: To restore Grub from Linux partition hda4 into MBR by Live CD
Note : This method requires a Live CD. If this method fails just type "grub" to invoke a Grub shell and use Task B4 method which is more robust. Grub can boot operating systems in a Grub prompt.
mkdir /mnt/temp
mount /dev/hda4 /mnt/temp
chroot /mnt/temp
grub-install /dev/hda
exit
reboot
B6: To restore Grub into MBR for Linux that has a rescue function in the installation CD (e.g. Fedora Core)
Note : This method requires the distro installation CD. Just boot up the installation CD and activate the rescue mode. For example in Fedora the command is "linux rescue". The installer will search your hard disk to find a copy it recognises and may require you to specify the root partition of the Linux you want to rescue. You should choose one that has "(/)" indicated if you are not sure. Basically the installer mounts it automatically for you using a standard name like "/mnt/sysimage" as in Fedora. Assuming that is the case you are restoring Grub same as Task B5 except with a different mounting point as follow:
B7: To restore the MBR of Windows Vista by the installation CD
Note : This method requires Vista installation CD. When you carry out the instructions listed below a copy of Vista's MBR will be restore into your hard disk
Boot up the installation CD
Choose a language
Click "next"
Click "Reapir your computer"
Further information (http://support.microsoft.com/kb/927392/en-us) to use Vista installation CD rescuing its MBR
Task C: To boot Dos, Windows, BSD or Solaris using a Grub floppy
Note : This is using a Grub floppy to boot a non-Linux system. See later Tasks D to H for booting Linux
C1: To boot any Dos or Windows from 1st bootable disk by Grub floppy
Note : For system in 2nd, 3rd or 4th primary partition use (hd0,1), (hd0,2) and (hd0,3) in the root statement. Makeactive statement is only needed if there is another system using the bootable flag in the same drive. MS System is in the first partition of the bootable drive.
root (hd0,0)
chainloader +1
makeactive
boot
C2: To boot any Dos or Windows from 2nd bootable disk by Grub floppy
Note : System installed in 1st bootable drive but later moved to 2nd drive. The two map statements let the MS system reclaim the 1st bootable disk status.
root (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1
makeactive
boot
C3: To boot multiple installations of Dos and Windows by Grub floppy
Note : System was originally installed in 1st bootable drive 2nd partition and has another MS system in front. Later the disk was moved to 4th disk position.
root (hd3,1)
hide (hd3,0)
unhide (hd3,1)
map (hd3) (hd0)
map (hd0) (hd3)
chainloader +1
boot
C4: OpenBSD, NetBSD, FreeBSD, Dragonfly BSD, Desktop BSD and PcBSD
Note : Need to deny the BSD installer access to the MBR during installation to force it to place its boot loader in the root partition
Same as Dos/Windows system, see Task C1
C5: Solaris 10 and Express
Note : Need to deny the Solaris installer access to the MBR during installation to force it to place its boot loader in the root partition
Same as Dos/Windows system, see Task C1
Task D : Make a Linux chainloadable by Ntldr, Lilo or Grub
Note : A Linux is chainloadable if it has a boot loader inside its root partition. This allows another system's boot loader, for example Ntldr from XP or Win2k, Lilo or Grub from another Linux, to boot it. In chainloading a boot loader A boots a second boot loader B. It is up to the second boot loader B to boots its own master.
D1: To make a Linux "chainloadable in partition hda8 with Grub by a Grub floppy or Live CD
Note : Can be done either in a Grub prompt from a bootable Grub floppy or in a Grub shell from a Live CD if it has Grub inside.
root (hd0,7)
setup (hd0,7)
D2: To make a Linux "chainloadable in partition hda8 with Grub by a Live CD
Note : If grub-install fails then invoke a Grub shell and try Task D1 as it is more robust.
mkdir /mnt/temp
mount /dev/hda8 /mnt/temp
chroot /mnt/temp
grub-install /dev/hda8
D3: To make a Linux "chainloadable in partition hda8 with Lilo by a Live CD
Note : If Lilo fails you may have to boot the system up manually by Grub. See Tasks F & G
mkdir /mnt/temp
mount /dev/hda8 /mnt/temp
chroot /mnt/temp
lilo –b /dev/hda8
D4: To make Linux chainloadable that has a rescue section in the installation CD
Note : Only works if the Linux installation CD has such a facility. The principle steps used are similar to Tasks D2 & D3.
Boot up the Linux installation CD
follow the instructions to re-install the boot loader
and choose the root partition as the destination
To be continue in Post #3 (due to size limitation on post size)
je_fro
01-17-2006, 10:48 PM
great job!
this qualifies for the Help Library --> http://justlinux.com/forum/forumdisplay.php?f=49
saikee
01-18-2006, 04:34 AM
je_fro,
Thanks. Is it possible for me to edit the sticky? I might have additional information or improvement later on. I use it to help others as well because I could just refere them to the Task number.
So it wasn't you in my dream then!
-------------------------------------------------------------------
below is the continuation of Post #1 ( due to size limitation)
Task E : To boot a Linux with a boot loader inside its root partition
Note : A Linux is very easy to boot if it has a boot loader inside its root partition. Both Grub and Lilo can boot such a Linux with 2 generic lines.
E1: Using a Grub floppy to boot a chainlaodable Linux with Grub or Lilo in partition hda8.
Note : See Task D on how to make a Linux chainloadable. This method works for both Lilo and Grub. The tool used is the Grub floppy
root (hd0,7)
chainloader +1
boot
E2: To add another Linux in hda8 to a working Grub configuration file
Note : The working Grub is the one the PC boot to and its configuration file is /boot/grub/menu.lst. Grub has no difficulty in accepting over 100 systems in /boot/grub/menu.lst
root (hd0,7)
chainloader +1
boot
E3: To add another Linux in hda8 to a working Lilo configuration file
Note : The working Lilo is the one the PC boot to and its configuration file is /etc/lilo.conf. Depending on the version of the Lilo a maximum of 27 images can be booted by a /etc/lilo.conf
other=/dev/hda8
label=Linux_in_hda8
E4: To use Windows Ntldr (XP or Win2k) to boot a chainlaodable Linux in partition hda8.
Note : The file boot_hda8.lnx is the first 512 bytes of Linux boot loader in partition hda8. It has to be copied into the partition where XP/Win2k is booted. (commands are showed in red) This method works only if the Linux is chainloadable. See Section D for how to make a Linux chainloadable first.
In Linux :- Copy the first 512 bytes into a file
dd if=/dev/hda8 of=boot_hda8.lnx bs=512 count=1
then copy the file boot_hda8.lnx into "C" drive of Windows
In Windows
cd \
attrib -r -s -h boot.ini
edit boot.ini
Add C:\boot_hda8.lnx="My New Linux in hda8" to boot.ini, under the section "Operating system"
save the file boot.ini
attrib +r +s +h boot.ini
Tip : Using a modern Linux way is a lot faster. Some modern Linux like Slax 6.0 is already shipped with ntfs-3g, gives root privilege to the user, mounts all partitions in the PC, sees every Windows hidden file and permits the boot.ini to be edited directly. So the work needed is just the Magenta bits as everything can be done in Slax Linux without booting up Xp.
E5: To use Windows Vista to boot a chainlaodable Linux in partition hda8.
Note : The file boot_hda8.lnx is the first 512 bytes of Linux boot loader in partition hda8. It has to be copied into the partition where Vista is booted. (commands are showed in red) This method works only if the Linux is chainloadable. See Section D for how to make a Linux chainloadable first.
In Linux :- Copy the first 512 bytes into a file
dd if=/dev/hda8 of=boot_hda8.lnx bs=512 count=1
then copy the file boot_hda8.lnx into "C" drive of Windows Vista
In Windows Vista right click "Command Prompt" and select "Run as Adminstrator"
bcdedit /displayorder {c4c13df3-7949-11dc-98f8-81e4e48608ff} /addlast
In the above the data in Magenta are input.
Task F : To boot a Linux with no boot loader inside its root partition
Note : The easy way is to install the boot loader of the Linux in its root partition. Many Linux users put a Linux boot loader into the MBR but do not realise it can be put inside the root partition also. If Task F fails to work try Task G.
F1: Any Linux say with root partition hda8.
Note : To make the Linux chainloadable is easier for booting purpose. Method works on any Linux with either Grub or Lilo as the boot loader.
(1) Follow Task D to install boot loader inside Linux root partition
(2) Follow Task E to boot the Linix
Task G : To boot a Linux that cannot be chainloaded (initially by a Grub floppy)
Note : When a Linux cannot be chainloaded then its boot loader cannot boot itself at the installed position. Likely cause is beyond 137Gb barrier in the hard disk or in a high-partition number the Linux doesn't support. The Linux in this case has to be booted directly by naming its kernel and initrd filenames. Initially the Linux is booted by a Grub floppy manually. Once in working order just put the manual instructions into a /boot/grub.menu.lst.
G1: Linux uses Grub still has a menu.lst but cannot be chainloaded, root partition being hda8.
Note : If root partition is unknown use Task A2 to find it out. The initrd statement is optional and may not be used by a Linux like those from the Slax or Slackware families.
(1) To display Grub’s menu.lst on the screen by
cat (hd0,7)/boot/grub/menu.lst
(2) Type its content at the terminal line by line
starting with the “root” statement
and finish with “initrd” statement if used
(3) Boot the system up with this additional line
boot
G2: Any Linux that uses Grub or Lilo as the boot loader, assuming root partition being hda8.
Note : The Linux is assumed to have no configuration file of /boot/grub/menu.lst or /etc/lilo.conf. To use the Live CD to find out the full name of vmlinuz and initrd in /boot directory of the Linux for Stage (1), say they are vmlinuz-2.6.15-8-i386 and initrd-2.6.15-8-i386 then use them in Stage (2). If the Linux refuses to boot then review the error message to introduce addition parameters to pass on during boot time. From experience most Linux will answer the call. If the Linux is stubborn and refuses to boot altering “ro” to “rw” in Task G2 may be able to kick start it.
Stage (1) to obtain kernel and initrd filenames
(a) by booting a Linux Live CD
mkdir /mnt/tmp
mount /dev/hda8 /mnt/tmp
ls /boot
(b) by booting a Grub floppy/CD to get a Grub prompt
Use Task A4 to list Grub's configuration file /boot/grub/menu.lst
or
Use Task A5 to list Lilo's configuration file /etc/lilo.conf
Stage (2) to boot the Linux directly (adjust the Green bits to suit your case)
root (hd0,7)
kernel /boot/vmlinuz-2.6.15-8-i386 ro root=/dev/hda8
initrd /boot/initrd-2.6.15-8-i386
boot
Note : Task G2 is a method using Grub to boot up a Linux installed with Lilo as its boot loader.
No need to type out every file name in full, just type part of it and use the "tap" key to let Grub to match what it can find for you
Task H : Possible tasks with a Linux Live CD on an unbootable Linux
Note : Using a Live CD to rescue an unbootable Linux is a new and reliable method. Together with a Grub floppy there should be no Linux unbootable.
H1: To acess the files of the unbootable Linux, say in partition hda9
Note : Need to log in as root user, use "su" or add "sudo" in front of the privileged commands
mkdir /mnt/hda9
mount /dev/hda9 /mnt/hda9
H2: To get inside the unbootable Linux in hda9
Note : It is possible some Live CDs may disallow “chroot” unless log in as root. After the "chroot" statement the user will ne inside the unbootable Linux
mkdir /mnt/hda9
mount /dev/hda9 /mnt/hda9
chroot /mnt/hda9
Task J : Possible alternatives to obtain a Grub prompt to help booting
Note : The Grub floppy produces a Grub prompt with which a user can boot any PC system. The Grub prompt is always available from the following alternatives
J1: From a Linux with a plain Grub menu with option to edit the menu at the bottom
Note : Majority of distros has a plain menu with a splash screen at the background. The bottom of the menu border shows a few lines of instructions The last few words of the last line is "c" for a command-line.
press "c" to trigger a Grub prompt
J2: From a Linux with a Grub menu with option to edit the menu "hidden"
Note : Putting a "#" in front of the "fgxmenu" statement will disable that statement, allowing the plain menu to be shown again. Distros uses the gfxmenu statement include Suse and Kanotix.
(1) Edit the Linux's /boot/grub/menu.ls[/color]
(2) Put a "#" in front of the "fgxmenu" statement
(3) Follow instruction of Task J1
J3: To make a bootable Grub CD (for laptop users without a floppy drive)
Note : There are two mthods. One is to use Linux's "mkisofs" command to turn Grub's file stage2_eltorito into an iso file and then burn it into a CD. The other is to burn a bootable Grub floppy into a CD using the emulation mode available in certain CD burners
Method (1) Follow Chapter 3.4 of the GNU/Grub official bible Grub Manual (http://www.gnu.org/software/grub/manual/grub.html#Making-a-GRUB-bootable-CD_002dROM).
(a) Need only one file "stage2_eltorito" from Grub
(b) Use the latest version of Grub whenever possible
(c) Copy "stage2_eltorito" into designated directory in Linux
(d) Create an iso file out of it by the "mkisofs" command
(e) Burn the iso image into a CD, all done in Linux.
Method (2) Follow the steps of this site (http://www.bay-wolf.com/bootcd.htm)
(i) You need a bootable Grub floppy (See Task A).
(ii) You also need Ahead's Nero Burning ROM software
(iii) The resulting CD is an emulation of the "A" drive.
(iv) No installed Linux needed and CD is created in Windows
J4: From a Linux Live CD booted up by Grub instead of isolinux
Note : At boot up screen press "Esc" key will change from graphic to text mode then press "c" key will get into a Grub prompt.
The following Linux and Solaris CD/DVD are booted by Grub instead of isolinux. As such any one can provide a Grub prompt (First press "Esc" key then "c" key) -- idea prompted by i845
Mepis
Frugalware
Sidux
Kanotix
Yoper
DreamLinux
eLive
Linux Gamer
Belinix
Solaris (both Version 10 and Express)
Please note the list not exhaustive and changes can take place between releases
DanceMan
02-13-2006, 06:42 PM
Thanks for all the work you've done in posting your knowledge of booting. I found this through the mention in the Inquirer, and the links in your sig. This thread should help me fix a Vector Linux SOHO install that won't boot (and I even reinstalled it to fix the booting problem).
I have another booting issue you might be able to offer advice on. I have a notebook with a Win2k and Ubuntu dual boot. Prior to this I tried to install WinXP with the machine's own restore disks. The restore disks booted to Win 98 Dos and appeared to run Ghost files, but the install failed on the second disk with read errors. It also gave read errors with another XP disk from my other notebook. My own burned Win2k slipstreamed with USP5.1 disk and the Ubuntu disk had no problems.
But I digress. The failed restore left an "Intel boot agent" on the boot sector. It boots to that, which fails, and then Grub takes over and gives me my Ubuntu and Win2k choices. I'd like to get rid of the Intel boot agent so it would boot directly to Grub, but I've been afraid of messing up the boot sector and being left with an unbootable system.
I'm guessing that some of your instructions above could be used to rewrite the MBR, but I'd like to get specific advice on how to proceed. Should I use a Win CD to restore the Win MBR, and then the Ubuntu CD to restore Grub? Would doing this overwrite the Intel boot agent, and would it restore my current Grub dual boot?
saikee
02-13-2006, 08:04 PM
Best bet is while booting up Ubuntu and in root terminal type
fdisk -l
to see if there is any partition that you are not aware of.
Grub only occupies the first 512bytes of the hard disk known as the MBR and you can restore Xp's MBR as often as you want. Equally booting any Live CD can allow you to restore Grub back into the MBR as stated in my booting tips.
My guess is the vendor booting agent could have its own partition.
Ghost does use Dos to restore and clone XP because XP does not permit itself to be cloned. You always need to run another OS to clone it. Your XP re-install may need the other systems clear out of the hard disk as it might need specific location of the hard disk to reside in ( for example it was mean to be reinstalled back to the second partition with the booting agent in the first.
Equally you may be running out of a primary partition for XP to come back to.
DanceMan
02-13-2006, 09:01 PM
Equally you may be running out of a primary partition for XP to come back to.
Not sure precisely what you mean by this.
I partitioned the disk with GParted before I did anything. I'll have to check again, but because I was only going to have three partitions and a swap, I may have left them all primaries. Experience also taught me to leave the first partition as unallocated space and let Windows partition and format it during the install. The third partition is for data, currently a hidden FAT32 that needs to be unhidden. Windows couldn't see the FAT32 created by GParted, and another partitioner had only the hidden option for a FAT32.
The XP attempt was done over top of an existing Win2k install. Following that, Win2k was reinstalled. Prior to the original partition, the disk had zeros written with Dban.
saikee
02-13-2006, 09:23 PM
You are only allowed 4 primaries in a hard disk. If you have logical partitions then one primary must be given up for exchange for an extended partition.
I feel you definitely need to know your own partitioning scheme of the hard disk.
I am not confiident of restoring a XP on top of a Win2k partition because the files are different in the two OSs. You may need to format the Win2k partition before letting XP to take up residence.
Also i expect a Fat32 partition created and formatted in Linux to be recognised and used by Windows. If a Windows system doesn't see it then it is mostly likely the partition has not been formatted.
DanceMan
02-13-2006, 10:14 PM
I knew about the 4 primaries. I spent several days partitioning and repartitioning a disk with GParted and fdisk (linux from a KnoppMyth disk) and it was a great learning process. By the time I partitioned this disk, I had a fairly good grasp of what I was doing. It's just that after a month and a half since I did it, I can't remember everything precisely. I just checked from within the Ubuntu install and it showed only 4 partitions, including the swap. I'll check again from bootable cd's, but it's not showing a partition for the Intel boot agent. I'm assuming the MBR is contained within the Win partition, which is the first on the disk.
I've confused you. I tried to install XP from the restore disks, but for now 2k will stay on the drive and I'll use my 2k disk for any MBR repairs.
Windows could not see the FAT32 partition (from its creation with GParted) in order to format it. That's why I tried another partitioner. I think I may just need a partitioner with more options, and then a bootable cd that can format in FAT32.
saikee
02-14-2006, 04:21 AM
I use cfdisk mainly and fdisk for display the contents of the hard disks.
The above partitioning programs DO NOT format the partitions. In fact I don't think any of them do except XP/Win2k's Disk Management which is a combination of the two.
What you need to do is in Ubuntu to issue the mkdosfs command. If you want hda3 to be formatted in Fat32 just type
mkdosfs -F32 /dev/hda3
It is a good practice to unmount the partition first if it has been mounted by Linux in any formatting.
Ubuntu do a Live CD and with it you should be able to cure all the booting problems if you have any.
DanceMan
05-10-2006, 12:32 AM
I solved the FAT 32 partition problem with a linux disc that I think is called the System Rescue disk. It contains partitioning tools and one of them did the trick.
I still haven't tackled the MBR issue. I will probably be reformatting the entire disk later this summer after the next version of Ubuntu comes out, and will likely try to get XP on the Win partition at that point.
kozaki
10-01-2006, 01:02 PM
saikee, those "Just boot tips" are just great :D
Thank you for this yeah !
saikee
10-01-2006, 08:18 PM
Glad it is of use to some. I just summarized the tips I picked up from the forum.
DavidMD
10-01-2006, 09:13 PM
Hello, 'saikee'.Glad it is of use to some. I just summarized the tips I picked up from the forum.Although I realize that "me, too" replies have been a violation of "netiquette," since the early days of the BBS (http://en.wikipedia.org/wiki/Bulletin_Board_System), FidoNet (http://en.wikipedia.org/wiki/Fidonet), and Usenet (http://en.wikipedia.org/wiki/UseNet), I want to take a moment to express my gratitude for your thorough and well-written tips!
I am about to start work on two Linux computers. The CentOS (http://www.centos.org/)-based server should not pose any booting problems -- except for unexpected ones caused by "user error," ;) but I plan to install Debian (http://www.debian.org/) GNU/Linux on my workstation, after I install and stabilize SuSE Linux 10.1 (http://snipurl.com/xrj6) (or, possibly, 10.0).
Your booting tips will definitely be a comforting resource when I set up a Linux multi-boot environment. (I may even try to install the copy of FreeBSD (http://www.freebsd.org/) 6.1 that I have had since June.)
Thank you, 'saikee', for your many contributions to the JustLinux community! :)
Cordially,
David
Davno
10-02-2006, 03:43 AM
Hey Thanks.
That thread was not a waste of the company's ink and paper. :)
saikee
10-02-2006, 06:59 AM
My face turns red when reading your compliements. I benefit a great deal from reading the JustLinux posts and comments from the moderators.
I see this thread, an indeed myself, as an end product of the effort from various forum members/moderators in helping me to understand Linux since I joined as a newbie.
I cut my teeth here and am pretty pround of it. I carry this thread (and some other JL threads) as signature in other forums too.
DavidMD
10-03-2006, 04:02 PM
Hello, again, 'saikee'.My face turns red when reading your compliements.At least red is a natural color (unlike some others), indicating that you are modest, although you have obviously learned a great deal about Linux and are generous enough to share your knowledge with us, 'saikee'. :)
I benefit a great deal from reading the JustLinux posts and comments from the moderators.
I see this thread, an indeed myself, as an end product of the effort from various forum members/moderators in helping me to understand Linux since I joined as a newbie.I feel the same way about my experience in the JustLinux forums, 'saikee'.
I remember one of the earliest threads that I started, soon after I'd installed Linux (SuSE Linux Professional 8.0). I wanted to download and compile the source of the program (the name of which escapes my feeble mind right now) that SuSE (long before Novell's acquisition) used to generate all of the amazing graphics on its retail boxes for SuSE Linux Professional and SuSE Linux Personal. The project's page on SourceForge.net indicated that it apparently had been dormant for two years.
After the exchanging of many messages (beyond the patience of most mortals), ;) a very kind woman provided me with step-by-step instructions for retrieving the latest version of the source code from CVS, which I had never used before, and -- after retrieving the source and compiling the program -- I was soon generating some amazing graphics from the program's command-line switches.
I will have to try to find that thread. The woman who helped me patiently held my hand over the course of a few days, even retrieving and compiling the source herself to ensure that I (a total stranger) would have no problems. :)
I cut my teeth here and am pretty pround of it. I carry this thread (and some other JL threads) as signature in other forums too.I, too, 'saikee', "cut my teeth here," and I continue to benefit from JustLinux. I do my best to offer help when I feel qualified, because I see JustLinux not only as a source of help, but as an international community -- and I feel that it is my duty to try to contribute to this community, which has done so much for me.
I have been using Linux for over four years now, but I consider myself a neophyte/"newbie" in most areas. I am grateful to moderators and fellow members of JustLinux, 'saikee', including you.
Thanks, again!
Cordially,
David
Parcival
05-20-2007, 07:08 AM
Okay, saikee, now I'm in the need for holding my hand for a little while walking through this.
This morning I installed Xubuntu Feisty Fawn (first) and Windows 98 (second) on my mom's old laptop that still meets the Xubuntu minimal requirements.
The Xubuntu installer is stupid. The installation went more or less until the end when it said it can't copy GRUB to /target/ - with /target/ being the RAM-disk. Therefore I quit the installation since it was almost done anyway and planned to add GRUB manually later.
Then I installed Win98 to hda1 which went smoothly except that the old laptop now refuses to read any CD.
So there I went, created a GRUB bootdisk with your booting tips and did
root (hd0,2)
setup (hd0)
but got the answer that neither /boot/grub/stage1 exists nor /grub/stage1. Obviously Xubuntu has completely failed to even copy the package into hda3. So now I'd like to install GRUB into the MBR and have all the menu.lst etc. reside in hda3. How do I need to proceed?
Parcival
05-20-2007, 07:35 AM
Update: I can boot Linux with the help of booting tip G2 (God bless tab completion!), but how can I make this permanent? My poor mom can't be confronted with using a GRUB disk everytime she turns on ehr computer. ;) :D
saikee
05-20-2007, 09:21 AM
OK I got your message.
I think the easiest way out is to boot up Xubuntu CD as the recent version can work as a Live CD.
You can find all the files needed by Grub in a ..../grub subdirectory in the filing system of the boot-up Xubuntu. It should be in a directory of
/usr/lib/grub/i386-pc
Inside you will find all the necessary Grub files like stage1, stage2 stage1.5 , etc . Just copy the content of this directory into the Xubuntu hard disk partition hda3 you are installing. Put it in as /boot/grub of this partition which you use to mount Xubuntu's "/".
Once you done that fire up a Grub shell in the boot-up Xubuntu (I mean the CD version, as the hard disk version isn't bootable yet) and ask Grub to install itself there by the command you have used before, that is
root (hd0,2)
setup (hd0)
Grub will work this time as the files needed are available.
Up to this point your Grub only boots to a Grub prompt, same saituation as using a bootable Grub disk. However as you can boot Xubuntu up manually the commands are in fact "the" same commands you need if you have to create a menu.lst inside /boot/grub directory.
Your menu.lst therefore should have for booting Xubuntu something like
title Xubuntu in hda3
root (hd0,2)
kernel /boot/vmlinuz........
initrd /boot/initrd....................
The difference between manual booting and automatically from the hard disk is in the former you omit the "title" statement (marked red above) and you need to add the "boot" statement as the green light for Grub to proceed.
I trust you have no problem of adding a "default" statement to allow the user to boot to Win9x, by putting these lines infront of the Xubuntu lines in menu.lst
color black/green yellow/cyan
default 0
timeout 10
title I am Win98, press the "enter" key boot me please!
root (hd0,0)
makeactive
chainloader +1
Don't think the "makeactive" statement is needed here because no one is going to make it inactive but there is no harm to have it. I have added the color statement so that you can vary whatever the color scheme to please your mom.
Parcival
05-20-2007, 05:36 PM
It should be in a directory of
/usr/lib/grub/i386-pc
Inside you will find all the necessary Grub files like stage1, stage2 stage1.5 , etc.
Ahh, that was the hard part I didn't know. :) From this point on everything else went smoothly, thank you very much. :)
Aleksander
06-04-2007, 03:07 AM
Greetings Everyone,
Being sick of Windows XP and fed up with it freezing up my new computer on daily bases I decided to switch to Ubuntu that "just works". I have downloaded the Ubuntu 7.04 and burnt it onto CD. I decided to install it on one of my three internal HDD (320 GB WDigital SATAII) . The first thing that I lost was a mouse. That happened 15 sec after a sort of Welcome screen with an install icon appeared on my monitor’s screen. As my keyboard was still working I proceeded with installation of my Linux without a use of the mouse, thinking that it was just a small driver problem. Anyway, the installation was successful although I used keyboard only and I had to restart the system. Of course anyone can guess what had happened next. I got that terrible message :
GRUB loading Stage 1.5
Grub loading, please wait....
Error 21_
At very first minute, when it happened I went browsing for forums on the other computer and thanks to MR Saikee’s advice I at least restored Windows boot by running fdisk/mbr from FreeDOS. But returning to Ubuntu was impossible.
Now since I found a number of forums, what really scares the hell out of me, is that I don’t understand a word you people are saying about Booting Tips, Installation, and about a hundred other things.
But it gets better!
For the foolproof and an OS that “just works” – Ubuntu seems to have awfully a lot of users having nothing but problems with it. Because I am a total dummy in regards to Linux and I ain’t no computer expert either it makes me very frightened. How do I get all the knowledge about installing, booting and configuring Ubuntu? Is there a book or a website with those step by step instructions?
I need to come back to Windows every now and then (I use CAD and haven’t got a Linux version), but with those boot problems I stumble and can’t do a thing about it beside keep restoring a MBR.
All that tech jargon on forums doesn’t help. Thank you for any advice, tips and instructions you can give me.
My Comp Configuration (just in case):
Intel Core 2 duo CPU 2.4GHz
7300GS nVIDIA 256mb graphics
4GB RAM
on ASUS P5N-32 SLI Premium Motherboard
with regards,
Alexander
saikee
06-04-2007, 08:04 AM
Alekander,
Welcome to JustLinux.
JustLinux has a lot of experienced Linux experts who can talk "-" and "." in the commands but there are newbies at the bottom of the food chain like myself who try to make thing simple whenever possible. Having said that some explosure into the Linux terminal commands will guarantee huge reward. And if I may say so the terminal commands of Linux is perhaps representing at least 50% of the wealth of that OS hidden from the desktop. I survive on only one text book "Linux in a nutshell".
This thread has a hidden message of that the two most lethal booting weapons are
(1) Grub bootable floppy (or CD or pen drive)
(2) A Linux Live CD.
You can boot any PC system by the former. The latter is the universal tool to "restore" any Linux boot loader.
You should isolate your problem and concentrate to solve them one at a time. The mouse problem can be overcome if you plug in a PS2 mouse as some distros can mismatch a mouse driver easily especially if you are using a fancy one.
According to Grub Manual, which I always consult by just Google, the error 21 is
21 : Selected disk does not exist
This prompts me to believe the problem lies with Ubuntu or you may have altered the disk order in the bios causing Ubuntu to boot to the wrong disk other than the one it was originally installed.
To resolve the problem you need to do the following
(a) Stop messing around the boot disk order, freeze it now or a setting that it works for at least one system.
(b) post the output of the following after booting up Ubuntu CD, which can be used as a Live CD
(1) the terminal command of "sudo fdisk -l"
(2) /boot/grub/menu.lst (tells us how Grub boots Ubuntu)
(3) /boot/grub/device.map (tells us the boot disk order at time of installation)
(4) /etc/fstab (tells us the partitions the kernel has been instructed to mount)
The Item (1) tells us every partition of everyt disk in your PC
The Items (2), (3) and (4) are to be obtained from installed Ubuntu partition which you need to mount it first from the boot-up CD. If you do not know how just supply the Item (1) and we shall advise.
Aleksander
06-08-2007, 06:33 AM
Saikee, you're Champion!
Thanks a million!
I will try, but how to access command terminal from within live CD ?
Parcival
06-08-2007, 07:23 AM
I will try, but how to access command terminal from within live CD ?
You have several options:
some liveCDs allow you to boot into a "shell only" environment.
Just open a Terminal that comes with your desktop (Gnome/KDE/etc).
On any Linux machine, press Ctrl+Alt+F1 (to F4). F7 gets you back to the GUI.
saikee
06-08-2007, 12:10 PM
Alekander,
With Ubuntu Live CD you can follow either Item (2) or (3) suggested by Parcival.
Item (2) is always available if you are booted to a graphic desktop as in the case of Ubuntu. Just click the icon to go deeper into the menu and you will find "terminal".
The terminal command "sudo fdisk -l" will show up all the partitions in every disk. At this point if your are running a boot-up CD you are using the Ubuntu version of the CD. Every boot-up Linux has a filing system tree which you can see by command "ls".
To see/read/write an "installed" Ubuntu partition in the hard disk you need to mount this partition on the filing tree of the boot-up Linux and its /mnt directory is the common mounting point for such a purpose.
If you look at the output of the "fdisk-l" you will see a list of partitions. Depending on how you installed it the Linux will show up in several partitions of Type 83 and 82. The first type 83 partition is likely to be the one holding /boot directory whereas Type 82 denotes a swap partition. Assuming it is partition sda3, the first one with type 83, you can mount this partition by terminal commands
mkdir /mnt/sda3
sudo mount /dev/sda3 /mnt/sda3
ls /mnt/sda3
You can proceed to mount any partition "manually" and view its content this way.
In mounting you always mount a "device" on the boot-up Linux filing tree so as to access its content.
It is possible that the modern Linux like Ubuntu might have mounted every partition for you "automatically". Do a search /media and /mnt in the desktop. I am reasonably certain Ubuntu uses /media for mounting partitions whewereas older distros would use /mnt.
To display a system file you need to use the terminal command "sudo cat /mnt/sda3/boot/grub/menu.lst". To edit it would be "sudo vi /mnt/sda3/boot/grub/menu.lst" but you need to know the basic commands of "vi" in order to use the line editor properly.
Ubuntu does not permit a root login to the graphic desktop and system files may be locked and not displayable to an ordinary user. However pre-fix every terminal command with "sudo" can give you the root privilege In Ubuntu family distros. Therefore you can use a graphic editor in terminal by command
sudo gedit /mnt/sda3/boot/grub/menu.lst if you find "vi" tough going. "vi" is available in 99% of Linux in terminal mode whereas "gedit" is only available in distros with Gnome its use in terminal is not always implemented. Knowing a little bit of "vi" is a good insurance policy if you are serious about Linux.
Aleksander
06-09-2007, 05:40 AM
Thank you Guys! You rock!
That's all I need for now.
I definitely have to get a PS2 mouse. Both the keyboard and the mouse would not work if connected to USB.
kvrprasad
02-17-2008, 10:42 AM
Thanks for the quick guide. Great job
pxumsgdxpcvjm
04-02-2008, 05:47 AM
I have just found this on google and bookmared two old theads and this one
http://www.justlinux.com/forum/showthread.php?t=149956&page=2
http://www.justlinux.com/forum/showthread.php?t=143973&page=2
First of all just great guide. I think you are currently the human on work who has understand multibooting the best. :) Booting is and multi booting is still one of the themes where you can`t find the informations million times on the net. Some questions are open for me, would be nice if you can answer.
1) I have just one computer for testing and I don`t want to touch my productive system. Therefore I am already quite confirm with VMware. Sadly VMware does not support booting from USB yet. You know any other virtualizer who can?
2) Or another question. You seam to have your grub on floppy. I don`t have a floppy anymore and do not really want to really on it. If I train and learn grub with (virtual) floppy inside VMware can I use later an USB-stick to replace floppy?
3) Could this work: 1. boot from an USB-stick and start grub 2. boot another OS from USB-stick/harddisk?
4) Any experience with full disk encryption? Could this work: 1 boot from USB-stick and start grub 2. boot TrueCrypt bootloader from another USB-stick 3. boot Windows?
saikee
04-02-2008, 09:43 AM
(1) AFAIK VMware, or the free version that I run, is just a mangement layer inside a host OS which can either be a MS Windows or a Linux. Thus you just boot to a Windows or a Linux and VMware is just a program inside.
When you call up a guest OS inside the host, by VMware, there is no real booting involved. The guest OS does not communicate with the outside except with the host, at least that is what my free version behaves. Many functions of the a guest system are not activated by VMware and booting is one of it.
I haven't tried other virtualizers yet.
(2) AFAIK Legacy Grub can be put in a floppy, USB device, CD, DVD, internal hard disk or external hard disk. You can also install Grub lagacy without an operating system attached to it. The best bootable media for Grub, apart from a floppy, is the CD. This is because neither a CD nor a floppy upsets the hard disk order. When using a USB flash drive to boot that drive becomes the 1st bootable disk and forces all the other disks go up the order by one.
(3) You can boot up Grub in any USB device and use it to boot other systems in any other media (except CD and DVD), but do take note the disk order as mentioned in Item (2) above. I have not gone into Grub 2 yet.
(4) I don't think encrypted partition will work with either Linux boot loader Grub or Lilo. Grub and Lilo need to be able to read the partition in order to load the kernel and initrd files. This is if Grub boot a system directly.
However when booting indirectly Grub can boot any other boot loader if it conforms with the PC standard and resides in the boot sector. All MS unencrypted systems do that but I have no experience with the encrypted partitions. I got the feeling it will work as the boot loader doesn't get encrypted because it is never part of a filing system and always stored in a binary format.
pxumsgdxpcvjm
04-06-2008, 07:03 PM
(1) I think VMware does "real" booting (emulated), it can boot up cd, hd and floppy currently.
(2) Ok, I understand. Does grub1 have a find by name feature like grub2?
I don`t know currently what is better. grub1, grub2 or syslinux. However, thought your help booting is now much less a mystery story for me.
(3) Great info.
(4) Normally grub can chain load any unencrypted bootsector very well. Unfortunately it isn`t working with TrueCrypt. The TrueCrypt bootloader seams to be a bit different from normal bootloaders, violating any standard I have no idea. Bios can boot TrueCrypt bootsector, grub not. I should try grub2 maybe it is even better for this situation.
(5) I add a new question. Do you know how to chain load another bootsector from USB if there is no native support for usb booting from bios?
That`s already possible for no native support for booting from cd. First a linux kernel initializes the device and then chain loades another bootsector. Very compliated, I did not found any success story's on google.
saikee
04-07-2008, 03:44 AM
(1) VMware car "read" an iso file and and fire up the kernel. One can't configure the boot loader inside to boot a system outside VMware or inside VMware, at least that is what I found. I suppose your definition of booting is different to mind.
(2) Grub legacy can read any partition that it supports including those filing systems in MS Dos/Windows, Solaris and BSD. For those systems it doesn't support, like NTFS, Grub boots its OS indirectly by chainloading its boot sector. It virtually cut and paste itself with the next boot loader.
Thus one can use Grub to display the Lilo's configuration and boot up that Linux without using Lilo.
syslinux is a light weight Dos-based bootloader designed to run on fat partitions. I haven't gone into Grub 2 because it has no documentation. All the Linux I have seen so far are based on Grub legacy.
(3) Closed
(4) Grub is a general boot loader that can be used to boot any PC system. If a Truecrypt partition can be booted by a boot loader it is because that boot loader has been compiled with a Truecrypt driver. Grub does not have the *****ion to become a universal boot loader that can handle every filing system with every encryption. After all it is only a small boot loader suppose to pass the control to an operating system. It is not in a boot loader's scope to decipher the content of a encrypted partition. That job lies with the kernel.
I expect Grub to be able to boot the boot loader of an encripted partition but I have not worked with the Encrpt partition. The boot loader in the boot sector is always stored in binary pattern ready to be loaded into the CPU. The boot sector is not a part of a filing system and so it is never encrypted, as far as I know, but that doesn't stop people doing non-standard PC feature with it.
Grub legacy is already being acused of being too large for what it is able to do at the moment, relative to other boot loaders.
(5) If the mobo does not support booting from a USB device then the Bios does know the existence of the USB device. In such case Grub can't find it because Grub relies on the Bios to get the disk information.
Grub can boot from a CD. It has a special version of it called stage2_Eltorito. A minority of distros also use it. One can boot a CD with only Grub inside or with any operating system compiled as an iso to be booted by Grub. CD used a different filing system, has no partition and no usual sector devision as a hard disk.
In general if the Bios reports a bootable device Grub legacy should be able to boot it. At least that is my experience so far.
One has to remember at the time the boot loader is operating it does not have the benefit of a kernel and its drivers. The boot loader's duty is always to boot the kernel in Linux, a module in a Unix-like system or another boot loader of another operating system.
pxumsgdxpcvjm
05-04-2008, 05:24 PM
I have some new questions.
(1)
There are 3 HD`s.
IDE 0,0 harddisk (hd0) (file system not recognized by Windows)
IDE 0,1 harddisk (hd1) (file system not recognized by Windows)
IDE 1,0 CD-ROM
IDE 1,1 harddisk (hd2) (empty)
Windows XP shall be installed on hd2. The Windows setup wants to format hd0 to place some startup files there.
IDE 0,1 and IDE 0,1 in BIOS does not help. The Windows setup is seeing them anyway, I guess because it loads their own disk controller driver and is talking directly to the harddisks and not thought the BIOS.
Also map (hd0) (hd2) and then booting the CD-ROM (with grub4dos or smartbootmanager) didn`t work, guess for the same reason.
What probably would work is physically detaching IDE 0,0 and IDE 0,1 while installing. But I am for a more professional solution with less violence. ;) Therefore I am asking you here for advice.
(2)
Still I am looking for a good replacement for legacy floppy. I would like to use an USB flash drive just in floppy emulation mode or even better as superfloppy.
When booting from USB flash drives or USB harddrives the USB becomes (hd0) and C:\. This quite problematic (especially when you want your bootmanger on USB) because it`s not a full IDE 0,0 harddrive emulation mode. I mean, it`s C:\ but if some applications ask what`s on IDE 0,0 it returns the USB drive, others return the real IDE 0,0.
Much better it would be if the USB drive could become (fd0) and A:\. But when formating an USB as superfloppy my BIOS can no longer boot it (only formated as harddisk). However. Is this even possible if the BIOS could boot up superfloppy to see the USB as (fd0) or at least as A:\?
saikee
05-05-2008, 06:09 AM
AFAIK if your Bios allows you to choose another hard disk to boot up first then you should have no problem in selecting (hd2).
If you manage to elect (hd2) to boot up first then XP will write its MBR on disk (hd2). and you can run XP happy as long as (hd2) is the first bootable disk.
When you change the 1st boot disk to (hd0) you need two extra map statements to tell Grub to re-map (hd2) on-the-fly to (hd0) if XP is booted.
The above should work alright without physically altering the electrical connections of the hard disks.
Window XP, and all other Dos and Windows too, always assumes it is the only one in the PC and so if there is a first boot disk it needs to place its boot loader there if the system is installed in another disk. That characteristic cannot be changed.
Regarding using the Grub on USB you can do it as long as you remember this rule.
If you boot up a USB disk device it is looked upon by the Bios as a "hard disk" and so it becomes (hd0) by default. This pushes all your existing hard disks up in number by one.
Therefore say without the USB device the Grub in hard disk (hd0) boots successfully your XP in (hd2) by command
title Windows XP installed as (hd0,0) now booted from (hd2,0)
root (hd2,0)
map (hd2) (hd0)
map (hd0) (hd2)
chainloader +1
After inserting the USB disk you can highlight the XP choice but instead of pressing enter to fire it up you press "e" key to edit the lines. The editions are the two map statements (edition marked in red).
map (hd3) (hd0)
map (hd0) (hd3)
Then XP will boot up just same as before.
Therefore you can do it with a USB memory device to house Grub but just remember its menu.lst has to be adjusted for the one extra disk number. Alternatively you do he amendment manually in every boot up demonstrated in above.
Using a floppy or a CD does not have such drawback because neither of these two is a "hard disk", as far as Bios is concerned.
There may be a way you can cheat Linux on the device names, of change a USB memory device to /dev/fd0, but I wouldn't know how to do it myself. I find the honest way is still the best. As long as you know the reason behind it you should be able to find a way out. That has been my happy arrangement with Linux so far.
gearond
05-15-2008, 01:36 AM
I have read some articles here on booting that are way and above better than anything else anywhere else. Kudos to the submitters. I learned a lot, THANKS!
TrueCrypt works by putting a tiny, PRE-BOOT decryption test program in the MBR. This tests the different algorithms with the supplied password and looks for the word TRUE in the Volume Boot Record. (At least in Windblows versions)
For it to be successfully chainloaded, the trueCrypt MBR has to be stored in a partition OTHER than the Windblows partition it is for, loaded as if it were the Volume Boot record, and if Active Flag is correct in the Partition Table (in the stored TrueCrypt MBR?), it will then do it's thing and boot(strap) the encrypted Windblows partition.
So, gurus all, can GRUB boot a stored MBR? The motherboard wouldn't care, I don't think, because the VOLUME BOOT RECORD is written over the MBR in memory, right?
All thoughts ,(expert knowledge, and fearless experimentation), appreciated.
saikee
05-15-2008, 07:47 AM
Never do encrypted partitions myself.
The way you explain then technically it would not be a problem because Grub does not use the active flag at all.
You can therefore put the TrueCrypt in a separate partition, activate its "active" or "bootable" flag and instruct Grub to chainload it.
In a separate partition TrueCrypt can make use of the boot sector there to do whatever it has been coded.
Kind of snow under with work otherwise might give it a try myself.
pxumsgdxpcvjm
05-16-2008, 04:45 AM
Hey! I got help here and now I want to share my little knowledge also. Ok, about TrueCrypt... Isn`t exactly what you are asking for I think but it`s imho still a very nice workarround. I like bootmanagers on any other medium like internal harddisks very much.
First of all a general info. I don`t think TrueCrypt can be installed in another partition then hd0,0 and it will always take the whole MBR for itself. The TC bootloader can not be simple chainloaded for some strange reason, but the TC bootloader is a chainloader itself, he will boot any partition/harddisk after hd0,0.
solution #1)
The best is to have TrueCrypt on floppy. Or on CD-RW. You can also boot from USB if your BIOS supports that. Note that the booted USB device will become hd0.
tc.iso = the TrueCrypt rescue CD created while encrypting a system partition. It`s only working for this and only this unique disk, no other iso can be used. Here is an example for floppy. It needs grub4dos (I did read storys that there are problems with memdisk, but not confirmed myself.).
solution #2)
You could use isolinux (and only isolinux, not syslinux because syslinux does not have the localboot command) and then use localboot 0x80, it will chainload the first harddisk (including MBR).
solution #3)
dd if=/dev/sda of=/media/disk/tcboot bs=512 count=1
You can chainload tcboot with grub.
justlinux.com
Copyright 2007 Jupitermedia Corporation All Rights Reserved.