-
loadlin-like loading of knoppix from a win2k/NT/XP session
Hi,
I'm using knoppix on some weird hardwares. Customized the kernel and miniroot.gz (linuxrc) to work with them - should be ok. However, the boxes can't boot off their CDROM or FLOPPY (which are USB).
In the days of DOS-based windows versions, I'd have just remastered knoppix to include loadlin and a script that loads the kernel and initrd. However, as far as I can tell, loadlin doesn't work from NT-based kernels such as Win2k.
I'd like to include some program in my knoppix CD, which can be executed from windows, kick windows out of memory (like loadlin does for dos), and bootstrap a kernel/initrd set.
Anyone knows a method to achieve that ?
Mack
-
Senior Member
registered user
The solution here is to have a DOS partition in order to run loadlin.
You may repartition your hd or you may reinstall w2k over a DOS partion (win98 DOS 6.22) fox example. Then you wil be able to boot into DOS or Windows.
your boot.ini file must be something like this
[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="Windo ws " /fastdetect
C:\="DOS 6.22"
-

Originally Posted by
oscar
The solution here is to have a DOS partition in order to run loadlin.
You may repartition your hd or you may reinstall w2k over a DOS partion (win98 DOS 6.22) fox example. Then you wil be able to boot into DOS or Windows.
Thanks. Thats the solution I was first going for, but unfortunately, repartitioning of the local disks is not an option. Even if I do get away with it in this case, I'd like to find a general solution that doesn't require local modifications (after all, thats what knoppix is about
) and add this solution to knoppix.
I'm sure other users have also ran into situations where booting knoppix from a windows session would've helped. For example, when knoppix is on a USB device and the bios doesn't support booting from USB. (Unfortunately, a lot of bioses don't). If there is already a running linux on the system, one can use kexec() to load a new kernel, thus switching to knoppix. I'd like to achieve the same from a (more common) windows session.
Ideally, the Knoppix CD will have a .BAT which, when clicked on (in windows), will do a loadlin-like trick and load knoppix instead of the running windows. Thats how it used to be with some Linux CDs before NT became a standard for windows boxes.
-
Senior Member
registered user
"mack
Ideally, the Knoppix CD will have a .BAT which, when clicked on (in windows), will do a loadlin-like trick and load knoppix instead of the running windows. Thats how it used to be with some Linux CDs before NT became a standard for windows boxes.
Forget this. Loadlin must be clicked on in DOS.
Now and then.
Old linux (win98,95,me) boots DOS just after booting linux. Loadlin must be clicked on just after booting windows enviroment.
There must be something capable of booting DOS or Linux (lilo). If you have not a booting cdrom, a booting floppy or a HD booting DOS or linux it is not possible. You have to many restrictions.
-
Senior Member
registered user
I believe it would work given :
1. there is a FAT/FAT32 partition(without that, everything is off)
2. install a copy of freedos/opendos(?) on it
3. change the boot.ini(XP/NT) to add an item to boot DOS(I don't know how to grab the boot record of freedos, may be a generic one from an old DOS machine would work)
4. loadlin in the DOS autoexec.bat
-

Originally Posted by
garyng
I believe it would work given :
1. there is a FAT/FAT32 partition(without that, everything is off)
2. install a copy of freedos/opendos(?) on it
3. change the boot.ini(XP/NT) to add an item to boot DOS(I don't know how to grab the boot record of freedos, may be a generic one from an old DOS machine would work)
4. loadlin in the DOS autoexec.bat
Thanks. That sounds like a good way that covers at least the cases where a FAT-based partition exists. I'll try it.
I guess the only way in case of an NTFS system would be to somehow install grub on it from inside windows (if thats even possible) and use it to boot linux.
-
Senior Member
registered user

Originally Posted by
mack
I guess the only way in case of an NTFS system would be to somehow install grub on it from inside windows (if thats even possible) and use it to boot linux.
I doubt grub support NTFS partition. I have thought about this 'linux in a XP environment' for some time and come to the conclusion that if there is no FAT, floppy/cd-rom boot is the only option as no linux boot loader can handle NTFS as far as I know.
-

Originally Posted by
garyng

Originally Posted by
mack
I guess the only way in case of an NTFS system would be to somehow install grub on it from inside windows (if thats even possible) and use it to boot linux.
I doubt grub support NTFS partition. I have thought about this 'linux in a XP environment' for some time and come to the conclusion that if there is no FAT, floppy/cd-rom boot is the only option as no linux boot loader can handle NTFS as far as I know.
Yes, seems like the only other option is to write a "driver" for win2k/xp, which works in kernel space and does the loadlin magic. Probably not too complicated once in ring0, but admin privs must be grabbed in the windows session in order to load that driver. There's always some M$ bug which allows that, but the loader will need to keep track of new local-exploits for windows. A bit of a pain for non-windows people. Maybe someone from ntbugtraq willing to maintain this part of the "loader" ?
-
Senior Member
registered user
And I was wrong. someone wrote a ntfs driver for grub around April, another person made use of it and build a 'grub under win32' utility about two weeks ago.
So it is now possible to use grub in an NTFS only environment. I am building it and will test it when I have the time. It would be something like the following :
(all under win32)
1. copy stage1, stage2(with ntfs support) and menu.lst to c:\(assume this is the boot drive, NTFS)
2. run the ntfsinsall utility to embedded the stage2 geometry in both stage1 and stage2(the same as the grub-install under linux), this would also insert the menu.lst name in stage2
3. add c:\stage1="linux" to boot.ini
viola, it is now possible to chain boot from NT loader to grub and move on to linux.
caveat, the above has not been tested yet as I don't have a NTFS only system at the moment but do briefly test the ntfs support in stage2 which can read NTFS files.
If I have time, I may modify the win32 program to handle FAT/FAT32/NTFS and it would be possible to install a copy of KNOPPIX, all from win32, no matter what FS is used when NT/XP is installed.
==============
I am using lilo to achive the above as I happened to have the C:\ as FAT32. However, this requires me to first boot into KNOPPIX to run the lilo command, doesn't work for your described scenario.
-

Originally Posted by
garyng
And I was wrong. someone wrote a ntfs driver for grub around April, another person made use of it and build a 'grub under win32' utility about two weeks ago.
Cool! So now it should be possible to install grub and boot linux (assuming the user has admin rights on windows, to install grub). It will make Knoppix usable on many (currently unusable) systems.

Originally Posted by
garyng
caveat, the above has not been tested yet as I don't have a NTFS only system at the moment but do briefly test the ntfs support in stage2 which can read NTFS files.
I don't have a live system to safely test it on, but I do have VMWare (which I usually use to make changes in knoppix). I'm not familiar with all the above (since I usually use lilo) but will give it a try. Will install an NTFS-only system inside a VM and try to start Knoppix off grub instead of boot from CD. If there's anything you want me to test while doing that, let me know.

Originally Posted by
garyng
If I have time, I may modify the win32 program to handle FAT/FAT32/NTFS and it would be possible to install a copy of KNOPPIX, all from win32, no matter what FS is used when NT/XP is installed.
Great. I'll set up a vmware environment to test it. Once you have the modified win32 program, I can test it for ya (or you can ssh into it if you want to play with it yourself) 

Originally Posted by
garyng
I am using lilo to achive the above as I happened to have the C:\ as FAT32. However, this requires me to first boot into KNOPPIX to run the lilo command, doesn't work for your described scenario.
Right. Once I'm inside linux I no longer care what the system looks like. The problem is just the first bootstrap. I want Knoppix to be able to boot on as many systems as possible.
Similar Threads
-
By y23 in forum Hardware & Booting
Replies: 3
Last Post: 09-12-2005, 09:09 PM
-
By bigkahuna in forum MS Windows & New to Linux
Replies: 5
Last Post: 01-13-2005, 09:47 PM
-
By Kumagoro in forum General Support
Replies: 4
Last Post: 05-27-2004, 08:54 PM
-
By rchinoy in forum General Support
Replies: 6
Last Post: 03-15-2004, 03:19 AM
-
By subarus in forum General Support
Replies: 2
Last Post: 04-28-2003, 04:48 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules

128GB (4x32GB) SK hynix DDR4 PC4-2666V RDIMM ECC Server Ram HMA84GR7CJR4N-VK
$799.00

Lot Of (8) Mixed RAM Spacer DDR4 2666 Micron 2400T Samsung 2133P Desktop Server
$880.00

TF/SD Card Adapter Camera Reader Android Type-c For iPhone17 Pro Max Plusm lot
$573.98

64 (32x2 GB) Memory for laptop Samsung PC4 2Rx8 2666V.
$260.00

USB 3.0 Flash Drive 32GB 64GB 128GB Memory Stick Thumb Stick Lot Pack
$826.09

32GB Micron PC4 – 3200AA DDR4 ECC Registered Server RAM - MTA36ASF4G72PZ-3G2J3
$200.00

USB 3.0 Micro SD SDHC TF Card Reader Memory Adapter for PC Laptop Camera lot
$3.75

SK hynix 64GB 4DRx4 PC4-2400T DDR4 ECC HMAA8GL7MMR4N-UH Server Memory
$300.00

Microsoft Office 2021 Pro Plus USB for 1PC Windows 10 & 11
$62.50

Windows 11 Pro Install/Recovery/Repair USB Flash Drive
$35.00