PDA

View Full Version : Question about KNOPPIX bootable floppy image with GRUB



wslkevin
09-19-2004, 09:27 AM
I downloaded KNOPPIX bootable floppy image - boot.img - from the web site http://debian.tu-bs.de/knoppix/CeBit/, then I tried use GRUB for DOS to boot my notebook up with boot.img.

I tried three different method to boot it, however, I got the following error message
"Inconsistent Filesystem Structure.
Error 17, ...
"

The following a,b,c are what I have tried in the GRUB config file menu.lst:

a. title boot.img [Knoppix original 1]
map --read-only (hd0,0)/boot/boot.img (fd0)
root (fd0)
kernel /linux24
initrd /minirt24.gz

b. title boot.img [Knoppix original 2]
map --read-only (hd0,0)/boot/boot.img (fd0)
root (fd0)
kernel /boot/bootimg/linux24
initrd /boot/bootimg/minirt24.gz
(P.S.:I use WinImage to extract all of the content of boot.img to C:\boot\bootimg)

c. title boot.img [Knoppix original 3]
map --read-only (hd0,0)/boot/boot.img (fd0)
chainloader (hd0,0)/boot/boot.img
rootnoverify (fd0)
boot

P.S. I use WinImage to write the boot,img to 1.44 floppy disk, and this floppy can boot up my notebook very well.

What is the problem with it? Thank you in advanced.

shah
09-19-2004, 01:56 PM
This is how I create my floppy boot grub, exact copy of my grub hdd installation without the need of kanotix ( what I'm using ) boot image.

1) format the floppy : mke2fs /dev/fd0
2) mount the floppy : mount /dev/fd0 /mnt/auto/floppy
3) make directory : mkdirhier /mnt/auto/floppy/boot/grub
4) change dir to grub on hd : cd /boot/grub
5) copy files needed to boot grub : cp stage1 stage2 /mnt/auto/floppy/boot/grub
6) copy all files so that floppy grub is exactly the same as hd: cp *.* /mnt/auto/floppy/boot/grub
7) unmount floppy : umount /dev/fd0

8) to create bootable floppy:
a) Open grub interactive mode (grub>) : grub
grub> device (fd0) /dev/fd0
grub> root (fd0)
grub> setup (fd0)
grub> quit

You're done and now have a boot floppy with nice grub menu. This procedure is for people who are using grub to boot and want floppy as a backup incase their grun got corrupted.

In your case, which I beleived you didn't installed grub on your hd, then you need a little work. You can follow the above procedure but need some editing.
1) You need to edit menu.lst, something like this:
Example:

title Debian GNU/Linux, kernel
root (hd1,4) **Your linux partition
kernel /boot/vmlinuz root=/dev/hdb5 ro ramdisk_size=100000 lang=de apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi nomce vga=791
savedefault
boot

title Debian GNU/Linux, kernel 2.6.6-kanotix-3
root (hd1,4)
kernel /boot/vmlinuz-2.6.6-kanotix-3 root=/dev/hdb5 ro ramdisk_size=100000 lang=de apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi nomce vga=791
savedefault
boot

title Windows 2K/XP/2003 (hda1)
rootnoverify (hd0,0)
makeactive
chainloader +1
savedefault

title Windows 95/98/ME (hdd1)
rootnoverify (hd2,0)
makeactive
chainloader +1
savedefault

2) Edit your device.map, should have all your harddisk:
example:
(hd0) /dev/hda
(hd1) /dev/hdb
(hd2) /dev/hdd

3) Copy message from /boot/message from hd to /boot/message to floppy. Then edit floppy menu.lst to reflect where your message is.
Example:
# Pretty colours
color cyan/blue white/blue
gfxmenu (fd0)/boot/message

That's all to it. I hope this will work. Good luck :D :D :D :D :D :D :D :D

shah
09-19-2004, 02:00 PM
6) copy all files so that floppy grub is exactly the same as hd: cp *.* /mnt/auto/floppy/boot/grub

Actually you only need to copy menu.lst and device.map. :D

wslkevin
09-19-2004, 03:08 PM
This is how I create my floppy boot grub, exact copy of my grub hdd installation without the need of kanotix ( what I'm using ) boot image.

1) format the floppy : mke2fs /dev/fd0
2) mount the floppy : mount /dev/fd0 /mnt/auto/floppy
3) make directory : mkdirhier /mnt/auto/floppy/boot/grub
4) change dir to grub on hd : cd /boot/grub
5) copy files needed to boot grub : cp stage1 stage2 /mnt/auto/floppy/boot/grub
6) copy all files so that floppy grub is exactly the same as hd: cp *.* /mnt/auto/floppy/boot/grub
7) unmount floppy : umount /dev/fd0

8) to create bootable floppy:
a) Open grub interactive mode (grub>) : grub
grub> device (fd0) /dev/fd0
grub> root (fd0)
grub> setup (fd0)
grub> quit

You're done and now have a boot floppy with nice grub menu. This procedure is for people who are using grub to boot and want floppy as a backup incase their grun got corrupted.

In your case, which I beleived you didn't installed grub on your hd, then you need a little work. You can follow the above procedure but need some editing.
1) You need to edit menu.lst, something like this:
Example:

title Debian GNU/Linux, kernel
root (hd1,4) **Your linux partition
kernel /boot/vmlinuz root=/dev/hdb5 ro ramdisk_size=100000 lang=de apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi nomce vga=791
savedefault
boot

title Debian GNU/Linux, kernel 2.6.6-kanotix-3
root (hd1,4)
kernel /boot/vmlinuz-2.6.6-kanotix-3 root=/dev/hdb5 ro ramdisk_size=100000 lang=de apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi nomce vga=791
savedefault
boot

title Windows 2K/XP/2003 (hda1)
rootnoverify (hd0,0)
makeactive
chainloader +1
savedefault

title Windows 95/98/ME (hdd1)
rootnoverify (hd2,0)
makeactive
chainloader +1
savedefault

2) Edit your device.map, should have all your harddisk:
example:
(hd0) /dev/hda
(hd1) /dev/hdb
(hd2) /dev/hdd

3) Copy message from /boot/message from hd to /boot/message to floppy. Then edit floppy menu.lst to reflect where your message is.
Example:
# Pretty colours
color cyan/blue white/blue
gfxmenu (fd0)/boot/message

That's all to it. I hope this will work. Good luck :D :D :D :D :D :D :D :D

Thank you very much for your detail reply. I have installed GRUB for DOS to my first hard disk partition, says, (hd0,0). What I am trying to do is use GRUB to boot KNOPPIX iso-image stored in NTFS partition.

I have solved the above problem, I use WinImage open boot.img and save it again as boot.ima, then everything is okey.

Could you tell me whether the following commands are running under Linux or Windows:
1) format the floppy : mke2fs /dev/fd0
2) mount the floppy : mount /dev/fd0 /mnt/auto/floppy
3) make directory : mkdirhier /mnt/auto/floppy/boot/grub
4) change dir to grub on hd : cd /boot/grub
5) copy files needed to boot grub : cp stage1 stage2 /mnt/auto/floppy/boot/grub
6) copy all files so that floppy grub is exactly the same as hd: cp *.* /mnt/auto/floppy/boot/grub
7) unmount floppy : umount /dev/fd0

Thank you again.

wslkevin
09-19-2004, 03:12 PM
Another question:

I copy the files bzImage and initrd.gz from the CD-Rom folder G:\isolinux, and modify the content of menu.lst (I am using GRUB for DOS) as following:

# For booting Linux
title Linux
root (hd0,0)
kernel /boot/bzImage
initrd /boot/initrd.gz

Wen I choose this item, the execution result is "Error 17: Inconsistent filesystem struction". What should I do? Thanks.

shah
09-20-2004, 06:47 AM
All above procedure is done in linux. :D

# For booting Linux
title Linux
root (hd0,0)
kernel /boot/bzImage
initrd /boot/initrd.gz


Inconsistent filesystem structure
This error is returned by the filesystem code to denote an internal error caused by the sanity checks of the filesystem structure on disk not matching what it expects. This is usually caused by a corrupt filesystem or bugs in the code handling it in GRUB.

See you didn't include where is your root partition, grub cannot find your image:
ex:
kernel /boot/bzImage root=/dev/hda*x

I might be wrong, I never use grub for dos before. :D

wslkevin
09-20-2004, 08:45 AM
All above procedure is done in linux. :D

# For booting Linux
title Linux
root (hd0,0)
kernel /boot/bzImage
initrd /boot/initrd.gz


Inconsistent filesystem structure
This error is returned by the filesystem code to denote an internal error caused by the sanity checks of the filesystem structure on disk not matching what it expects. This is usually caused by a corrupt filesystem or bugs in the code handling it in GRUB.

See you didn't include where is your root partition, grub cannot find your image:
ex:
kernel /boot/bzImage root=/dev/hda*x

I might be wrong, I never use grub for dos before. :D

Thanks for your reply.

I try the following config:
1. # For booting Linux
title Linux
root (hd0,0)
kernel /boot/bzImage root=/dev/hda1/linux4/base.img
initrd /boot/initrd.gz

and

2. # For booting Linux
title Linux
root (hd0,0)
kernel /boot/bzImage root=/dev/hda1/linux4/
initrd /boot/initrd.gz

For both config 1 and 2, I still got the same error message: "Error 17: Inconsistent Fileystem Structure."

Then I tried the config step by step in the GRUB command line, the error message displayed after I entered the "kernel .........." line.

eco2geek
09-20-2004, 09:52 AM
wslkevin: Before you go any further learning GRUB,

a) what version of Knoppix are you using? and
b) does your computer have a CD-ROM drive? and
c) are you trying to boot the ISO from an NTFS partition?

Because if you're trying to boot to the ISO using the files from "regular" Knoppix, you won't be able to boot without your computer having access to the Knoppix CD.

Why? Because Knoppix first boots using a compressed file system ("minirt24.gz" or "minirt26.gz", depending on which kernel you're using) that doesn't include the NTFS driver. It has to get the NTFS driver off the CD.

Now, if you have access to the Japanese edition of Knoppix (or simply its kernel and modified miniroot), you can. They included the NTFS driver in their miniroot and modified the startup script accordingly.

shah
09-20-2004, 10:22 AM
root=/dev/hda1/linux4/
This line suppose to reffer to where you install
kernel /boot/bzImage : root=/dev/hda1

I don't think you need this two lines:
kernel /boot/bzImage
initrd /boot/initrd.gz
It belongs to syslinux and to boot cd.

I think you need is something like this:
title Linux(kernel2.4)
root (hd0,0)
kernel /boot/vmlinuz-2.4.26 root=/dev/hda1 ro ramdisk_size=100000 lang=us
savedefault
boot

You do install knoppix on hda1 right? :D

wslkevin
09-20-2004, 03:27 PM
wslkevin: Before you go any further learning GRUB,

a) what version of Knoppix are you using? and
b) does your computer have a CD-ROM drive? and
c) are you trying to boot the ISO from an NTFS partition?

Because if you're trying to boot to the ISO using the files from "regular" Knoppix, you won't be able to boot without your computer having access to the Knoppix CD.

Why? Because Knoppix first boots using a compressed file system ("minirt24.gz" or "minirt26.gz", depending on which kernel you're using) that doesn't include the NTFS driver. It has to get the NTFS driver off the CD.

Now, if you have access to the Japanese edition of Knoppix (or simply its kernel and modified miniroot), you can. They included the NTFS driver in their miniroot and modified the startup script accordingly.

I don't have a CD-ROM, yes I am trying operate KNOPPIX off NTFS partition.

wslkevin
09-20-2004, 03:29 PM
root=/dev/hda1/linux4/
This line suppose to reffer to where you install
kernel /boot/bzImage : root=/dev/hda1

I don't think you need this two lines:
kernel /boot/bzImage
initrd /boot/initrd.gz
It belongs to syslinux and to boot cd.

I think you need is something like this:
title Linux(kernel2.4)
root (hd0,0)
kernel /boot/vmlinuz-2.4.26 root=/dev/hda1 ro ramdisk_size=100000 lang=us
savedefault
boot

You do install knoppix on hda1 right? :D

Do you mean
kernel /boot/bzImage
initrd /boot/initrd.gz
just work fine for syslinux? Is it possible to make it work for GRUB for DOS?

Yes, I do install knoppix to hda1.

Thank you very much.

shah
09-21-2004, 01:45 AM
Now I get it, you install to ntfs. My procedure is for normal installation all along.
Then what you need is this :
http://unit.aist.go.jp/it/knoppix/win/index-en.html

then follow how I create grub disk from linux.
:D :D

wslkevin
09-21-2004, 02:40 AM
Now I get it, you install to ntfs. My procedure is for normal installation all along.
Then what you need is this :
http://unit.aist.go.jp/it/knoppix/win/index-en.html

then follow how I create grub disk from linux.
:D :D

Thanks, I have visit this web before, v3.6 can install to NTFS.
While V3.4 can running on the top of coLinux. Have you ever tried it (V3.4)? I have tried, but failed.

wslkevin
09-21-2004, 05:31 AM
Now I get it, you install to ntfs. My procedure is for normal installation all along.
Then what you need is this :
http://unit.aist.go.jp/it/knoppix/win/index-en.html

then follow how I create grub disk from linux.
:D :D

Thanks, I have visit this web before, v3.6 can install to NTFS.
While V3.4 can running on the top of coLinux. Have you ever tried it (V3.4)? I have tried, but failed.

Problem solved.
Please refer to http://www.knoppix.net/forum/viewtopic.php?p=61029#61029.

Could I ask some question about GRUB for DOS, and questions about other linux dist here?