flat assembler
Message board for the users of flat assembler.

Index > MenuetOS > load image from partition other than the primary

Author
Thread Post new topic Reply to topic
mathi



Joined: 29 Mar 2004
Posts: 4
Location: Chennai, India
mathi 29 Mar 2004, 19:34
hai,

I have linux and winXP in my hard disk.
I use grub to boot them. I want to boot menuetos from the hard disk.
I have also added a entry for menuetos.
I am able to load the kernel KERNEL.MNT from my /dev/hda2 (F: drive)
but the kernel does not load the ram image from the fat32 partition.
The problem now is , i don't have a primary fat32 partition. That is, the
first partition in my hard disk is not a fat32 partition. I have ext2 partition as the first partition with linux installed in it.

here is my partition table

/dev/hda1 linux partition (red hat) boot
/dev/hda2 fat32 f: drive
/dev/hda3 fat32 (winxp) boot c: drive
/dev/hda4 fat32 d: drive

/dev/hda2 was once my linux swap (512 mb)
i formatted it in to a fat32 partition to install menuetos in it.
i also don't know why xp addresses it (/dev/hda2) as my f: drive

e: -- my cd rom drive

Is there any other way to install menuetos in my f: Sad Sad
Post 29 Mar 2004, 19:34
View user's profile Send private message Visit poster's website Yahoo Messenger Reply with quote
Tolle



Joined: 21 Jan 2004
Posts: 71
Tolle 30 Mar 2004, 05:13
It's possible, but you will need to reassemble the kernel.
In kernel.asm you will find:
Code:
...
; READ RAMDISK IMAGE FROM HD
   
        cmp   [boot_dev],1
        jne   no_sys_on_hd
        mov   [fat32part],1       ; Partition
        mov   [hdbase],0x1f0      ; Controller base
        mov   [hdpos],1           ;
        mov   [0xfe10],dword 0    ; entries in hd cache
        mov   [0x800000+1474560/1024],dword 0xffffffff
        mov   ecx,41
      hdbootl1:
        mov   eax,hdsysimage
        mov   ebx,12
        mov   edx,1
        mov   esi,0x90000
        pusha
        call  read_hd_file
...
    

changing the mov [fat32part],1 to mov [fat32part],2 worked for me.

Groenten,
Tolle.
Post 30 Mar 2004, 05:13
View user's profile Send private message Visit poster's website Reply with quote
Wishing



Joined: 21 Feb 2004
Posts: 56
Location: NY
Wishing 30 Mar 2004, 15:44
Idea ^_^

can we replace cmp [boot_dev],1 with

cmp [boot_dev],1
ja next2
mov [fat32part],1
jmp here

next2:
cmp [boot_dev],2
ja next3
mov [fat32part],2
jmp here

next3:
cmp [boot_dev],3
ja next4
mov [fat32part],3
jmp here

next4:
cmp [boot_dev],4
jne no_sys_on_hd
mov [fat32part],4

here:

and have another question in bootcode.inc

call printplan "Choose partition to read image from"
call getkey
dec al
mov [es:boot_partition-0x10000],al

this assumes you make a address 'boot_partition' in kernal.asm

so that if you choose to boot from HDD you can choose which partition too ^_^

(just and idea.. doesnt seem too hard)
Wishing
Post 30 Mar 2004, 15:44
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number Reply with quote
LiuJunfeng



Joined: 28 Nov 2003
Posts: 48
Location: China
LiuJunfeng 30 Mar 2004, 16:11
Must the Image file be in the root directory?
I'd like load it from "C:\boot\menuet.img"
So write a complete solution for this problem
Post 30 Mar 2004, 16:11
View user's profile Send private message Reply with quote
Wishing



Joined: 21 Feb 2004
Posts: 56
Location: NY
Wishing 31 Mar 2004, 06:15
kinda demanding arent we? this is GPL.
Post 31 Mar 2004, 06:15
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number Reply with quote
LiuJunfeng



Joined: 28 Nov 2003
Posts: 48
Location: China
LiuJunfeng 01 Apr 2004, 08:32
sorry, i can't say english very well
I mean suggestion.
Post 01 Apr 2004, 08:32
View user's profile Send private message Reply with quote
Wishing



Joined: 21 Feb 2004
Posts: 56
Location: NY
Wishing 02 Apr 2004, 04:30
No problem.. things like that happen... ill see what i can do.

_________________
446f6c7068696e
Post 02 Apr 2004, 04:30
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger ICQ Number Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum


Copyright © 1999-2023, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.