PDA

View Full Version : Solution: Very simple HD installation with cloop on VFAT par



chlor
04-10-2003, 09:48 PM
I don't know if this have been bought up before but in our LUG we were discussing a way to install KNOPPIX, in such as easy way that my mother could find out how to do it.

By looking at the miniroot.gz on the boot.img, we found linuxrc (placed in the root) was looking at all drives for a subdir called /KNOPPIX/

The normal behavior is that it is found on the cdrom, but it could also be on /dev/hda1.

You must have vfat or ext2 on your harddrive:
1. Boot up in Microsoft Windows
2. Open "My Computer"
3. Open cdrom "KNOPPIX"
4. Click right mouse button on subdir KNOPPIX and choose "copy"
5. Click back to "My Computer"
6. Click right mouse button on C: and choose "insert"
7. Make a boot floppy disk and keep the floppy in drive
8. Eject cdrom and reboot

I have a page here about it with pictures (in danish, sorry):
http://tyge.sslug.dk/knoppix/hdsimpel/

Stephen
04-10-2003, 10:01 PM
It's already in the docs (http://www.knoppix.net/docs/index.php/HdBasedHowTo) section. Nice to see you figured it out on your own though.

garyng
04-11-2003, 03:00 AM
I went one step further using lilo and don't need the floppy. Was tamped to try to put it on NTFS(with proper changes to miniroot.gz) but being occupied now building a custom kernel.

BTW, booting in this way, hda1(c:\) will become read only. I changed the code in linuxrc to make it read write.

VeeDubb
04-11-2003, 03:03 AM
I'm curious, what exactly is the point of installing this way? I found that installing knoppix with hd-install is mind numbingly simple. Much simpler in my opinion than even installing windows on new machine. The only remotely complicated section is the formatting of the partitions, but that's realy NOT hard if you know what you are doing OR have even remotely descent directions.

garyng
04-11-2003, 08:59 AM
For me, because I use a notebook which only has a 10G harddisk. HD install means seperate partition and the size is much larger(if I am not mistaken, the compressed CD would be expanded to full size).

Using this approach, I just put a 700M file on my VFAT(or may be NTFS) and can switch to a newer version by replacing this single file. Should I need the space(when I am in window), I just delete it.

BTW, you find it simpler than installing windows is that installing KNOPPIX on harddisk is technically 'clone' a system onto an existing machine which many corporation does the same in windows, which is much easier than a fresh install.

dng88
04-12-2003, 06:08 PM
I went one step further using lilo and don't need the floppy. Was tamped to try to put it on NTFS(with proper changes to miniroot.gz) but being occupied now building a custom kernel.

BTW, booting in this way, hda1(c:\) will become read only. I changed the code in linuxrc to make it read write.

That may be one way out of my portable that does not have floppy but can you not use lilo ... can you start up winxp and boot to a dos :-) command batch and then start linux from there ... or if you must lilo, how can you set it up under winxp and dual boot to a /knoppix under windows.

Further how do you change the code in linuxrc to deal with the rw issues? (I run winxp with fat32 and not ntfs and perhaps easier choice).

Thanks for any advice first.

garyng
04-13-2003, 06:00 AM
Well, my machine Dell Inspiron 2500 notebook comes with ME as stocked OS so I cannot boot to DOS and use loadlin, that is the reason I have to use LILO. I have documented my steps to trio boot XP/ME/KNOPPIX under the HDD install forum. You may try to search there. It is not very difficult but you just have to be careful. The first time I did it, I screw up the MBR and need to reinstall everything.

As for changes to linuxrc, it is done this way :

1. get into the boot.img and extract the vmlinuz and miniroot.gz file(there is a FAQ on this site under DOC) and put them on your c:\(or /dev/hda1)

2. gzip -d miniroot.gz
3. mount through loopback driver to the miniroot file(it is effectively a EXT2 system on a file)
4. modify the linuxrc script file and change the line that mount the device(cd-rom in the script, easy to find if you have some scripting experience) from "ro" to "rw"
5. gzip miniroot.gz

now setup lilo as normal

oscar
04-13-2003, 07:57 PM
"...3. mount through loopback driver to the miniroot file(it is effectively a EXT2 system on a file)... ?"

exactly how please?
thanks

************************************************** ********

DOS with winxp and winme (to use loadlin from HD)

If win is installed over a win98 partition then it is possible to boot into winxp or DOS at boot time

boot.ini example


[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOW S
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect
C:\="C:\ Win98 DOS"


There is a patch to apply winme in order to be able booting into DOS


http://www.geocities.com/mfd4life_2000/

oscar
04-14-2003, 06:00 AM
"...3. mount through loopback driver to the miniroot file(it is effectively a EXT2 system on a file)... ?"

exactly how please?

thanks


autoanswer :lol:


| 56: # cp /mnt/anyfile/miniroot.gz /tmp
| 57: # gzip -d /tmp/miniroot.gz
| 58: # mount -t ext2 -o loop /tmp/miniroot.img /mounting_point
| 60:
| 61:
| 62:
| 63:
| 64:after the edition of linuxrc
| 66:
| 67: # umount /mounting_point* * * * * * * *-> umounts miniroot
| 68: # gzip /tmp/miniroot.img * * * * * -> recompresses miniroot

chuckorc
04-16-2003, 08:34 PM
It's already in the docs (http://www.knoppix.net/docs/index.php/HdBasedHowTo) section. Nice to see you figured it out on your own though.
Does anyone know if this works with a NTFS filesystem? I followed the HdBasedHowTo instructions but the boot floppy can't find the c:\knoppix\knoppix file and boots to a minimal command prompt. Anybody have any suggestions on how to fix this problem? If I use the cd to boot everything works great.

One more small question, if you use a floppy boot disk are you still able to load or save your configuration to a different floppy?

:?:

garyng
04-17-2003, 09:47 AM
I am experimenting with NTFS partition.

I tried just copy the ntfs.o module to the initrd and load it but failed miserably. Will recompile a custom kernel with built-in NTFS support and try again.

Will let you know if I can make it work.

horo
04-17-2003, 12:20 PM
Hi,

cloop and ntfs don't work together :( .

I have tried it some time ago with a NTFS partition:
modprobe cloop file=/mnt/hda1/KNOPPIX/KNOPPIX

and I get an oops:
kernel NULL pointer dereference

Ciao Martin

garyng
04-17-2003, 12:30 PM
Just found out, too bad :cry:

A. Jorge Garcia
04-17-2003, 03:32 PM
I seem to remember using a DOS partition and LoadLin with Slackware Linux so I could reboot a WINDOZE box to Linux on the fly.

Do you think I could do this with the KNOPPIX file on c:\KNOPPIX as with the boot floppy option, just get rid of the floppy?

TIA,

chuckorc
04-17-2003, 03:33 PM
Thanks for the verification guys. I tried it a few times and thought I was doing something wrong. I wonder if we could get a caution added to the faq about this not working with ntfs partitions.

Thanks again for your help,
Chuck

oscar
04-18-2003, 05:56 AM
I seem to remember using a DOS partition and LoadLin with Slackware Linux so I could reboot a WINDOZE box to Linux on the fly.

Do you think I could do this with the KNOPPIX file on c:\KNOPPIX as with the boot floppy option, just get rid of the floppy?

TIA,

yes. You must extract vmlinuz and miniroot.gz from boot.img

for ex. c:

C:\loadlin\loadlin.exe c:\vmlinuz lang=es screen=800x600 ramdisk_size=100000 init=/etc/init apm=power-off hda=scsi hdb=scsi hdc=scsi hdd=scsi hde=scsi hdf=scsi hdg=scsi hdh=scsi vga=0x314 initrd=c:\miniroot.gz quiet BOOT_IMAGE=knoppix

oscar
04-18-2003, 06:10 AM
As for changes to linuxrc, it is done this way :

1. get into the boot.img and extract the vmlinuz and miniroot.gz file(there is a FAQ on this site under DOC) and put them on your c:\(or /dev/hda1)

2. gzip -d miniroot.gz
3. mount through loopback driver to the miniroot file(it is effectively a EXT2 system on a file)
4. modify the linuxrc script file and change the line that mount the device(cd-rom in the script, easy to find if you have some scripting experience) from "ro" to "rw"
5. gzip miniroot.gz

now setup lilo as normal

I have edited linuxrc as in step .4 but nothing changes. hda1 remains read only. ro appears only twice in the script, so there are few possibilities of mistake.
any further instructions or that is all?
thanks

garyng
04-18-2003, 11:45 AM
that is the only thing I changed. Are you sure it is the modified miniroot.gz(thus the linuxrc) being loaded ? I usually put a line in it like "echo "gary's midification'" to make sure.

oscar
04-18-2003, 06:40 PM
that is the only thing I changed. Are you sure it is the modified miniroot.gz(thus the linuxrc) being loaded ? I usually put a line in it like "echo "gary's midification'" to make sure.


yes, I am sure. Thanks.

A. Jorge Garcia
04-18-2003, 08:24 PM
BTW, garyng, I was wondering the same thing (re: how did I become a KNOPPIX Master by just asking a ton of questions...!

Regards,

A. Jorge Garcia
04-19-2003, 02:58 AM
>>
1. get into the boot.img and extract the vmlinuz and miniroot.gz file(there is a FAQ on this site under DOC) and put them on your c:\(or /dev/hda1)
<<

OK, I got these files off the boot disk. I put them along with the huge KNOPPIX file off the burned CD as well as loadlin.exe and a batch file with the following line in it.

loadlin.exe vmlinuz lang=en init=/etc/init initrd=c:\miniroot.gz quiet BOOT_IMAGE=knoppix

I start up the batch file and the PC reboots into KNOPPIX just like off the CD loading into the ramdisk, autodetecting everything and it even runs faster! The only problem is that this locks up the hdd as busy just like the CD used to be (well this frees up the CD drive). Also, this works on WIN95 and WIN98 but its a pain on WINME as you have to boot the rescue disk to get into DOS real mode (I was trying to get away from a boot disk that slows down the boot process).

My question now is, can I do this on a WINXP machine? I'm getting some of those next year in a new lab at school.

Thanx,

Fordiman
01-04-2005, 05:59 AM
I am experimenting with NTFS partition.

I tried just copy the ntfs.o module to the initrd and load it but failed miserably. Will recompile a custom kernel with built-in NTFS support and try again.

Will let you know if I can make it work.

Despite the other guy's concerns, I think you should give it a go anyway.

init is part of the KNOPPIX image. You need to put $INSMOD modules/ntfs.o in the linuxrc file found within minirt24.gz (so it has ntfs available before it starts looking for KNOPPIX). You should also copy ntfs.o (/lib/modules/2.4.27/kernel/fs/ntfs/ntfs.o) to the modules directory of the minirt.

It might just work. It's possible that the other guy tried it with an older version of knoppix (thus older versions of cloop and ntfs-linux. Especially ntfs-linux.) Hell, if he tried it with the 2.4.26 kernel, the change to 2.4.27 may have fixed the problem, too.

My current project is with Damn Small Linux, trying to implement support and modularity using squashfs (the "hey, you know what you could do with this?!" forum discussion is what led me here) I like squashfs a hell of a lot more than cloop, but cloop does have its points (One of my other projects is implementing an embedded/live version of DSL, and qemu has naitive support for cloop images - a boon for someone in my position)

have fun playing. Experimentation is the best thing that ever happened to computers.

ruymbeke
01-04-2005, 07:17 AM
I am experimenting with NTFS partition.

I tried just copy the ntfs.o module to the initrd and load it but failed miserably. Will recompile a custom kernel with built-in NTFS support and try again.

Will let you know if I can make it work.

Despite the other guy's concerns, I think you should give it a go anyway.

init is part of the KNOPPIX image. You need to put $INSMOD modules/ntfs.o in the linuxrc file found within minirt24.gz (so it has ntfs available before it starts looking for KNOPPIX). You should also copy ntfs.o (/lib/modules/2.4.27/kernel/fs/ntfs/ntfs.o) to the modules directory of the minirt.

It might just work. It's possible that the other guy tried it with an older version of knoppix (thus older versions of cloop and ntfs-linux. Especially ntfs-linux.) Hell, if he tried it with the 2.4.26 kernel, the change to 2.4.27 may have fixed the problem, too.

My current project is with Damn Small Linux, trying to implement support and modularity using squashfs (the "hey, you know what you could do with this?!" forum discussion is what led me here) I like squashfs a hell of a lot more than cloop, but cloop does have its points (One of my other projects is implementing an embedded/live version of DSL, and qemu has naitive support for cloop images - a boon for someone in my position)

have fun playing. Experimentation is the best thing that ever happened to computers.

I got it working from a ntfs/fat/floppy/usb dongle partition / media: have a look at this:
http://www.knoppix.net/forum/viewtopic.php?t=11796
Cheers, Gilles

brianez21
03-24-2005, 01:15 AM
Hello, I am really in need of help here -
I have a copy of Knoppix with kernel 2.4.27 and I would like to do a PMI onto my NTFS partition.
I have a copy of GRUB set up on my boot.ini already, it can read the minirt24 but drops me to a "minimal shell".
Of course, this is because the minirt24 dosen't support NTFS. Is there anyway I can modify the minirt24/linuxrc files to add NTFS boot support?
If so, exactly how do I do this?

Thank you so much!
Brian

ruymbeke
03-24-2005, 01:46 AM
Hello, I am really in need of help here -
I have a copy of Knoppix with kernel 2.4.27 and I would like to do a PMI onto my NTFS partition.
I have a copy of GRUB set up on my boot.ini already, it can read the minirt24 but drops me to a "minimal shell".
Of course, this is because the minirt24 dosen't support NTFS. Is there anyway I can modify the minirt24/linuxrc files to add NTFS boot support? If so, exactly how do I do this? Thank you so much! Brian
Get if already done from here: GRUBD.ZIP ==> http://s119307663.onlinehome.us/grubd.zip <==
Please have also a look at these:
Windows Partition PMI: http://www.knoppix.net/wiki/Win_Partition
(Long) discussion: http://www.knoppix.net/forum/viewtopic.php?t=11796 (look at the end of it)
Good Luck,
Gilles

brianez21
03-24-2005, 02:15 AM
Thank you, but I was actually looking for a step-by-step idea of what was changed.
I'll just go thru the files and look myself...

ruymbeke
03-24-2005, 08:30 AM
Thank you, but I was actually looking for a step-by-step idea of what was changed.
I'll just go thru the files and look myself...
Linuxrc has been changed to load the ntfs driver and add one level of loopback.
Ntfs driver files, mount and other utilities have been added...
Not that hard to make the changes but long to write an ehaustive list.
Regards, Gilles

brianez21
03-24-2005, 03:46 PM
I am using a remastered Knoppix 3.4. The link you sent me to was for 3.7 (guess I should have been more clear).
I think I need grub3.zip (http://www.knoppix.net/forum/viewtopic.php?t=11796&postdays=0&postorder=asc&highlight=grub3+zip&start=20) but the link there dosen't work. Does anyone have a copy they can email me or ftp to me?

Thanks - Brian

ruymbeke
03-24-2005, 06:36 PM
I am using a remastered Knoppix 3.4. The link you sent me to was for 3.7 (guess I should have been more clear). I think I need grub3.zip (http://www.knoppix.net/forum/viewtopic.php?t=11796&postdays=0&postorder=asc&highlight=grub3+zip&start=20) but the link there dosen't work. Does anyone have a copy they can email me or ftp to me?
Thanks - Brian
Here it is, but the grub3.zip only includes the knoppix 3.4 kernel 2.6 boot: ==> http://s119307663.onlinehome.us/grubd.zip <=
If I have time I can probably make the 2.4 kernel boot as well. Let me know...
Regards, Gilles

brianez21
03-24-2005, 09:26 PM
I am going to try this out, but I am trying to find out...:
How do I get NTFS to boot with Knoppix 3.4 and a 2.4.27 kernel?
Does grubd.zip even work with Knoppix 3.4?
---
I am also working on an automatic installer that edits your boot.ini or autoexec.bat and determines what version of the initrd (vfat or ntfs) you need for Windows. So far, the vfat and grub parts are mostly done. (I am stuck on the ntfs problem.)
It will be as easy to use as clicking on a .exe. I'll be sure to post a link when I'm finished!

~ Brian

ruymbeke
03-25-2005, 01:10 AM
I am going to try this out, but I am trying to find out...:
How do I get NTFS to boot with Knoppix 3.4 and a 2.4.27 kernel?
Does grubd.zip even work with Knoppix 3.4?
---
I am also working on an automatic installer that edits your boot.ini or autoexec.bat and determines what version of the initrd (vfat or ntfs) you need for Windows. So far, the vfat and grub parts are mostly done. (I am stuck on the ntfs problem.)
It will be as easy to use as clicking on a .exe. I'll be sure to post a link when I'm finished!

~ Brian
Grub3.zip will only work with knoppix 3.4 kernel 2.6 (not the 2.4). And Grubd.zip will work with knoppix 3.6 and 3.7 using kernels 2.4 and 2.6. So I have nothing at this time for knoppix 3.4 and kernel 2.4. But does it still make sense to work on that since we are currently testing knoppix 3.8 ?
About your program there is already such a tool on sourceforge called wingrub: http://grub4dos.sourceforge.net/
I am not sure this a good or bad news for you... but be assured that I really apreciate your efforts.
Cheers, Gilles

brianez21
03-25-2005, 02:13 AM
Thanks for clearing that up -
BTW I have already seen/used Wingrub, however the program I am working on is specially designed for Knoppix.
I will use the 2.6 kernel instead for my program and as for my own remaster, it runs the 2.4.27 kernel so your Knoppix 3.6 initrd works great with a few small changes. ;) Thanks for all the help!
Sincerely,
~ Brian

PS: I'll tell you when I finish the autoinstall app.