[ros-kernel] NTLDR - Can it boot vmlinux on NTFS?

Digital Infra, Inc. okajima at digitalinfra.co.jp
Wed May 19 19:17:22 CEST 2004


Hello ROS hackers.

I am member of coLinux development team.
and making conoppix, which is KNOPPIX + coLinux.
it runs as native Linux if you boot the CD, and runs as a Win32 app 
when you use it as autorun.inf CD-ROM.
(coLinux is a kind of emulator to run Linux as Win32 app.)

and addition to these two usage,
we are working on adding NTFS loop back boot to conoppix.
it means, you can install conoppix on your HDD and boot it
from c:/linux/vmlinux of NTFS without making new partition on your HDD.
Considering that our target of conoppix are newbies, 
this kind of feature is quite important.

As far as I know, there is two Linux which have this kind of feature.
one is topologi Linux (free). the other is MLD Linux (commercial).


We already succeeded to do it by NTLDR -> Grub chain with help from topologi team.
Thanks topologi team!.
but it needs to map sector position statically by an installer.
what we did is like this:
   MBR -> NTLDR -> GRUB 1st with sector position map of 2nd -> load 2nd ->
   -> GRUB 2nd -> vmlinux ...
the reason of mapping is, although NTLDR seems to be able to boot any size of kernel
image directly, but we only succeeded to load 512 bytes MBR style boot code.
so we used a first stage of Grub as that 512 bytes and wrote
sector position of a second stage directly there.

Yeah, it runs. but has some drawbacks.
first, it is redundant and not cool.
second, you occasionally have to run the installer to re-write the sector position.
at least, when you change something about 2nd loader, you have to fix the map.
and when you do defrag, you also have to fix it.
but not only that. there is a rumor that NTFS has "auto-defrag" function.
I have never experienced that, but some people say that even the 2nd loader has 
system and hidden attributte, and you dont run any defrag utility explicitly,
NTFS sometimes change a mapping of sectors automatically!. Alas....

then, I want some advices.

    1. Can FREELDR boot vmlinux on NTFS with a little hacking?
    2. Do you know how to boot more than 512 bytes code from NTLDR?
       Especially, how to boot 2nd of Grub directly from NTLDR?

I attached some logs to show you what MLD and topologi Linux do.
your suggestion is very welcome.

Thanks in advance.
                 Okajima, Jun. President, Digital Infra, Inc. Tokyo, Japan.                                         
                 coLinux development team http://www.colinux.org/

URLs:
Topologi Linux - Slackware without splitting your HDD.
  http://www.topologilinux.com/
MLD Linux - another loop back Linux. Japanese commercial software.
you can download trial version from the company's ftp site.
  http://www.mlb.co.jp/linux/support-mld7/hwtest.html
  ftp://www.mlb.co.jp/pub/linux/mld7/mld7hwtest.exe


-----------------------
[boot loader]
timeout=30
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
[operating systems]
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP 
Professional" /fastdetect
C:\mld7load\mbr="Linux MLD 7"
C:\boot\stage1="Topologilinux 4" 


---------------------------
C:\>dir mld7load
2004/03/01  05:27    <DIR>          .
2004/03/01  05:27    <DIR>          ..
2003/03/24  13:10             6,116 boot.b
2003/03/24  13:10               608 chain.b
2004/03/14  14:23               388 grub.cfg
2003/03/14  10:58           122,880 grubimg
2004/03/14  14:23               112 lilo.bat
2001/05/19  19:50            32,208 LOADLIN.EXE
2004/03/14  14:23            31,232 map
2004/03/14  14:23               512 mbr
2003/07/03  15:42            45,056 ntlilo.exe
2003/07/28  16:01         1,710,107 ramimage.gz
2003/01/25  12:00               512 stage1
2003/01/25  12:00           106,364 stage2
2003/07/21  21:41           999,004 vmlinuz

C:\>dir loop
2004/03/01  05:26    <DIR>          .
2004/03/01  05:26    <DIR>          ..
2004/03/14  14:17               821 devlist.txt
2004/03/14  14:23     2,097,152,000 mld7loop
2004/03/14  14:23                 8 mld7loop.ext

C:\>dir tlinux4
2004/04/09  13:09    <DIR>          .
2004/04/09  13:09    <DIR>          ..
2004/04/09  13:09     4,278,190,080 base.img
2003/11/09  01:19            12,517 readme.txt
2004/04/09  13:09       262,144,000 swap.img





More information about the Ros-kernel mailing list