Page 1 of 2 12 LastLast
Results 1 to 10 of 20

Thread: loadlin-like loading of knoppix from a win2k/NT/XP session

  1. #1
    Member registered user
    Join Date
    Jul 2003
    Posts
    39

    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

  2. #2
    Senior Member registered user
    Join Date
    Feb 2003
    Posts
    202
    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"

  3. #3
    Member registered user
    Join Date
    Jul 2003
    Posts
    39
    Quote 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.

  4. #4
    Senior Member registered user
    Join Date
    Feb 2003
    Posts
    202
    "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.

  5. #5
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    872
    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

  6. #6
    Member registered user
    Join Date
    Jul 2003
    Posts
    39
    Quote 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.

  7. #7
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    872
    Quote 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.

  8. #8
    Member registered user
    Join Date
    Jul 2003
    Posts
    39
    Quote Originally Posted by garyng
    Quote 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" ?

  9. #9
    Senior Member registered user
    Join Date
    Mar 2003
    Posts
    872
    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.

  10. #10
    Member registered user
    Join Date
    Jul 2003
    Posts
    39
    Quote 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.

    Quote 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.

    Quote 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)

    Quote 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.

Page 1 of 2 12 LastLast

Similar Threads

  1. Knoppix 3.8 LOADLIN (boot from DOS)
    By y23 in forum Hardware & Booting
    Replies: 3
    Last Post: 09-12-2005, 09:09 PM
  2. Loadlin and Knoppix 3.7?
    By bigkahuna in forum MS Windows & New to Linux
    Replies: 5
    Last Post: 01-13-2005, 09:47 PM
  3. Knoppix 3.4 - Loadlin and Windows ME
    By Kumagoro in forum General Support
    Replies: 4
    Last Post: 05-27-2004, 08:54 PM
  4. Ran Knoppix - now win2K won't startup
    By rchinoy in forum General Support
    Replies: 6
    Last Post: 03-15-2004, 03:19 AM
  5. How to use loadlin to boot Knoppix
    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
  •  


GIGABYTE A520M DS3H AC AMD AM4 Motherboard mATX picture

GIGABYTE A520M DS3H AC AMD AM4 Motherboard mATX

$59.99



GIGABYTE Z790 AORUS ELITE AX LGA 1700 Intel Z790 ATX Motherboard with DDR5 picture

GIGABYTE Z790 AORUS ELITE AX LGA 1700 Intel Z790 ATX Motherboard with DDR5

$189.99



Intel H310 LGA1151 8-9th Gen DDR4 M.2 NVMe mATX Motherboard IO Shield Battery picture

Intel H310 LGA1151 8-9th Gen DDR4 M.2 NVMe mATX Motherboard IO Shield Battery

$54.99



ASUS PRIME Z490-V Motherboard Intel Z490 10th gen DDR4 LGA 1200 ATX w/ IO Shield picture

ASUS PRIME Z490-V Motherboard Intel Z490 10th gen DDR4 LGA 1200 ATX w/ IO Shield

$84.99



GIGABYTE B365 HD3 LGA1151 Intel 9th Gen motherboard picture

GIGABYTE B365 HD3 LGA1151 Intel 9th Gen motherboard

$59.99



MSI B550M PRO-VDH Micro-ATX Motherboard - AMD AM4, Ryzen 5000/4000/3000 Ready, P picture

MSI B550M PRO-VDH Micro-ATX Motherboard - AMD AM4, Ryzen 5000/4000/3000 Ready, P

$71.49



MSI - B550M PRO-VDH WIFI (Socket AM4) AMD B550 MATX DDR4 Wi-Fi 6 Motherboard ... picture

MSI - B550M PRO-VDH WIFI (Socket AM4) AMD B550 MATX DDR4 Wi-Fi 6 Motherboard ...

$89.99



Asus Prime B660M-A AC D4 Motherboard Intel LGA 1700 14th 13th 12th Gen DDR4 picture

Asus Prime B660M-A AC D4 Motherboard Intel LGA 1700 14th 13th 12th Gen DDR4

$79.99



Gigabyte GA-B85M-D3H Motherboard picture

Gigabyte GA-B85M-D3H Motherboard

$54.99



Asus ROG Strix B460-H LGA 1200 ATX Intel 10th Gen DDR4 Motherboard picture

Asus ROG Strix B460-H LGA 1200 ATX Intel 10th Gen DDR4 Motherboard

$84.99