Jump to content











Photo
- - - - -

Howto boot SystemRescueCd iso with Grub4Dos?


  • Please log in to reply
21 replies to this topic

#1 -x-

-x-
  • Members
  • 6 posts

Posted 15 July 2009 - 08:48 PM

Hi!

I read many threads in this forum with similar problems and some of the very helpful documentations, but I didn't find a solution to my problem:

I want to build a multiboot disc by chain-booting the iso-image with Grub4Dos with the following parameters:
find --set-root /sysrescd.iso

map /sysrescd.iso (0xff) || map --mem /sysrescd.iso (0xff)

map --hook

chainloader (0xff)

Booting to main menu works fine. But booting the system fails because of a missing boot medium (/dev/sr0):
Posted Image

How can I make this work?

P.S.: Crossposted at http://www.sysresccd...opic.php?t=2667

#2 maanu

maanu

    Gold Member

  • Advanced user
  • 1134 posts
  •  
    Pakistan

Posted 16 July 2009 - 06:37 AM

multiboot disk means dvd/cd drive,right ?

can u plz post the content of isolinux.cfg from the iso ?

#3 -x-

-x-
  • Members
  • 6 posts

Posted 16 July 2009 - 07:25 AM

multiboot disk means dvd/cd drive,right ?

Yes, too. A USB-Version is the second step. But the CD/DVD-version is more important. If this works converting to USB is not so complicate.

Attached Files



#4 maanu

maanu

    Gold Member

  • Advanced user
  • 1134 posts
  •  
    Pakistan

Posted 16 July 2009 - 07:43 AM

im downloading latest v of rescue cd . and try myself first .

btw which option gave u the error , it has multiple start up options..

#5 -x-

-x-
  • Members
  • 6 posts

Posted 16 July 2009 - 07:49 AM

All options which starts with the main kernels: rescuecd (default), rescue64, altker32, altker64

#6 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 16 July 2009 - 08:14 AM

I use this for WinPE v2 ISO - if 1 does not work then try 2 or 3 (you will need to change BOOTMGR to bootloader file used in your iso


title 1 FIXED DISK EMULATION
find --set-root /winpe.iso
map /winpe.iso (hd32)
map --hook
chainloader /BOOTMGR

title 2 FLOPPY EMULATION - RAMDISK
find --set-root /winpe.iso
map --mem /winpe.iso (fd0)
map --hook
chainloader (fd0)/BOOTMGR
rootnoverify (fd0)

title 3 FLOPPY EMULATION - No ramdisk
find --set-root /winpe.iso
map /winpe.iso (fd0)
map --hook
chainloader (fd0)/BOOTMGR
rootnoverify (fd0)

http://www.boot-land...?showtopic=7916

HTH

#7 -x-

-x-
  • Members
  • 6 posts

Posted 16 July 2009 - 09:26 AM

I tried all 3 ways, but nothing works:

title src fixed disk emul

find --set-root /sysrescd.iso

map /sysrescd.iso (hd32)

map --hook

chainloader /boot/grub/grub.exe



title src floppy emul + ramdisk

find --set-root /sysrescd.iso

map --mem /sysrescd.iso (fd0)

map --hook

chainloader (fd0)/boot/grub/grub.exe

rootnotverify (fd0)



title src floppy emul - ramdisk

find --set-root /sysrescd.iso

map /sysrescd.iso (fd0)

map --hook

chainloader (fd0)/boot/grub/grub.exe

rootnotverify (fd0)

Type 1 means that it's booting, but than hangs and nothing happens anymore.
Type 2+3 means
Autodetect number-of-heads failed. Use default value 255

Autodetect sector-per-track failed. Use default value 63

chainloader (fd0)/boot/grub/grub.exe



Error 15: File not found

I tried it also with grldr intead of grub.exe. But the only difference was that in 1 the Grub4Dos main menu restarted. Could it be that the main problem is the mdev implementation?

#8 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 16 July 2009 - 09:56 AM

I use this for WinPE v2 ISO - if 1 does not work then try 2 or 3 (you will need to change BOOTMGR to bootloader file used in your iso


I use a lot of hot pepper on my linguine al pomodoro. ;)

The above is completely OFF-TOPIC ;), exactly as steve6375 post. :lol:

SysrescueCD is a Linux based Distro.

It's booting mechanism is different from that of a Windows based build.

But there are some points in common that maybe we can try to clarify in this particular occasion.

An operating system has basically two modes (exception made for DOS, see later) "real mode" and "protected mode".
DOS has ONLY "real mode" i.e. "trusts" the info the BIOS gives it, and Windows 3.x/9x/Me though having a "protected mode" still trust the BIOS.
Windows NT based systems starts in "real mode", trusting the info the BIOS gives it, then switches to "protected" mode, when the hardware is re-scanned and "protected mode" drivers load.
Linux does more or less the same, but not exactly.

grub4dos mapping actually replaces (temporarily) the BIOS.

Thus anything mapped or re-mapped in grub4dos is ONLY valid during the booting phase when the BIOS info is trusted.

DOS based things work allright, as the BIOS is always trusted.

Windows NT and Linux need some mechanism to "hook" the - in this case only temporary - info.

In Windows NT this is given by a DRIVER that takes control of the source of booting, a PE 2.x has this mecahnism automated, whilst PE 1.x need the RAMDISK.SYS mechanism or the Diskless Angel or however another Mass Storage Driver capable of giving access to the booting volume.

In Linux this is as well given by drivers, things are easier than in Windows NT, but still you need to give to the build some hint on HOW to mount the booting volume, and WHERE it is.

The SysresCD "main" entry is this one:
label us

  kernel rescuecd

  append initrd=initram.igz setkmap=us

Which translates in grub4dos to:

title SysrescueCD US
kernel /rescuecd setkmap=us
initrd /initram.igz

ONCE the ROOT has been established.

But once the initial ramdisk has been loaded, the Linux distro needs to know HOW/WHERE from to load the rest of the files.

You can try in your case this:
title SysrescueCD US

find --set-root /sysrescd.iso

map /sysrescd.iso (0xff)

map --hook

root (0xff)

kernel /rescuecd setkmap=us

initrd /initram.igz

But it probably WON'T work as well as INSIDE the Linux distro there is NOT a provision to find and load the boot volume (or the files in it).

Some modifications need to be made on the Linux side.

Some distros have been built with a mechanism that allows this kind of booting, a few with the actual idea of being booted by grub4dos through .iso mapping, like Parted Magic, most miss this mechanism.

This is the reason why I started this thread:
http://www.boot-land...?...ic=5041&hl=
only SOME distros/builds can be loaded with .iso mapping.

Read these threads:
http://www.boot-land...?...ic=4902&hl=
http://www.boot-land...?showtopic=8198
http://www.boot-land...?showtopic=7204

Hope to have contributed to clear the point that NOT "ANY" .iso can be mapped and booted through grub4dos .iso emulation UNLESS it has been "designed/built" for it or anyway uses already a "comaptible" boting mechanism.

jaclaz

#9 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 16 July 2009 - 10:00 AM

The main problem is that once the kernel is booted the grub4dos mapped iso isn't visible for the linux kernel (doesn't use INT13 BIOS calls to get data from a device), so SystemRescueCD can't find the other files it needs.

Short answer: grub4dos iso mapping won't work with SystemRescueCD
Long answer: You can edit SystemRescueCD so that it scans all devices and looks for the SystemRescueCD iso file on a device and mounts this file when found (Parted Magic does this).

See this part of the grub4dos tutorial for more information about the problem, which diddy added after my suggestion:
http://diddy.boot-la...es/map.htm#hd32

Edit: I was to slow. Jaclaz was faster ;), but I think my post adds something too :lol: .

#10 -x-

-x-
  • Members
  • 6 posts

Posted 16 July 2009 - 11:07 AM

Wow. Many thanks for so much infos. Very interesting. I'll work me through all the links later. Really great and thanks again.

Long answer: You can edit SystemRescueCD so that it scans all devices and looks for the SystemRescueCD iso file on a device and mounts this file when found (Parted Magic does this).

Sounds interesting. But how can I do this? Respectively: How does Parted Magic do this? In which files I've to search for the according code fragments so that I can have a look how this works? Or is this documented on some websites?

#11 was_jaclaz

was_jaclaz

    Finder

  • Advanced user
  • 7101 posts
  • Location:Gone in the mist
  •  
    Italy

Posted 16 July 2009 - 05:21 PM

Edit: I was to slow. Jaclaz was faster ;), but I think my post adds something too ;) .


You were not only SLOWER ;), you also posted an invalid link! ;)

http://&quot/;%20<a%20href="http://diddy.boot-land.net/grub4dos/files/map.htm#hd32""%20target="_blank">http://diddy.boot-land.net/grub4dos/files/map.htm#hd32"</a>

This one works:
http://diddy.boot-la...es/map.htm#hd32

:lol:

jaclaz

#12 Icecube

Icecube

    Gold Member

  • Team Reboot
  • 1063 posts
  •  
    Belgium

Posted 16 July 2009 - 07:18 PM

You were not only SLOWER ;), you also posted an invalid link! ;)

I never said that you had to click on it ;) . I also could let it point to a malicious website, if I did know one :lol:, so you better look good out of your eyes before you click on a link (which you should do anyway). The link is fixed now.

I think it is caused by a bug in the forum software:
http://&quot/;%20<a%20href="http://diddy.boot-land.net/grub4dos/files/map.htm#hd32""%20target="_blank">http://diddy.boot-land.net/grub4dos/files/map.htm#hd32"</a>

Translated:
http://

&quot/;  ==> "

%20	  ==> [space] character

&lt;	 ==> <

a		==> a

%20	  ==> &#91;space&#93; character

href=

&quot;   ==> &#34;

http&#58;//diddy.boot-land.net/grub4dos/files/map.htm#hd32

&quot;   ==> &#34;

&quot;   ==> &#34;

%20	  ==> &#91;space&#93; character

target=

&quot;   ==> &#34;

_blank

&quot;   ==> &#34;

&gt;	 ==> >

http&#58;//diddy.boot-land.net/grub4dos/files/map.htm#hd32

&quot;   ==> &#34;

&lt;	 ==> <

/a	   ==> /a

&gt;	 ==> >

Which looks very similar too:
<a href=&#34;http&#58;//diddy.boot-land.net/grub4dos/files/map.htm#hd32&#34; target=&#34;_blank&#34;>http&#58;//diddy.boot-land.net/grub4dos/files/map.htm#hd32</a>

@ -x-
You have (can) to look at the init file inside of the initramfs file of Parted Magic.

#13 -x-

-x-
  • Members
  • 6 posts

Posted 18 July 2009 - 04:27 PM

Many thanks. It seems to be the most complicated way, but I think it's also the cleanest. I printed out the Init-Scripts of both systems and will work me now through the codes. But the SRC-init is 6x bigger and more complex than the other one and so it could be that it'll take some time till I can (maybe) patch it. But I'll try and if I've solved it, than I'll reply it here.

#14 cestmoi

cestmoi
  • Members
  • 4 posts
  •  
    France

Posted 20 March 2013 - 11:24 PM

almost  5 years later... but it seems here never to late to share findings :

as I had still a lot of trouble to find answers on this site or throughout the web to this rather simple above question/topic... especially as SystemRescueCD online manual isn't perfect... cf. http://www.sysresccd...eCd_on_harddisk

even if SystemRescueCD is a really great distro/tool/CD, which I highly recommend to anyone

 

I am a newbee in this field (ever worked only on Apple macs until a few weeks ago) so sorry for the possible amateurism here

 

context:

I was able to boot the iso from a Win7 initial multi-boot MBR/BCD built with the help of EasyBCD, with 4 primary partition on my HD: Win7, win8, the 2 others, in ext3 format, with various Linux distros under testing preferably booted just as ISOs from my Win7 initial boot:

in easyBCD, I had just built a 3rd entry "Linux' with its option "neogrub", allowing in fact just to implement in the Win7-MBR/BCD (the 2 areas are linked, Windows mixing and recopying these contents, but that's another story) ... a pointer to C:\NST\menu.lst in my Win7 partition:

C:\NST\ contains also, implemented auto by EasyBCD with the Neogrub option, the file C:\NST\NeoGrub.mbr which appears to be in fact just grub4dos as indicated on the 2nd boot screen (?) (which I understood is rather similar/identical to the 'grub legacy' as opposed to grub2 ?)

summary: hence I have this way 2 levels of booting:

1st level: Win7/Win8/Linux

2nd level (in selecting 'Linux'): the various grub entries which I implemented in editing the file menu.lst (see hereunder)

 

menu.lst

 

to implement/boot the content of the latest SystemRescueCD iso from a HD, without having to burn/use a CD, I tested 2 methods with success (...aftet a while of testing):

 

(1) the one indicated in the link above, in extracting/copying the files from the iso, and using their grub4dos boot code (see hereunder)

 

(2) in booting directly the .iso without extracting anything (better/easier), but no grub4dos solution given, only a grub2 more complex solution to implement (didn't test grub2 yet; seems rather more complicated to implement than my own solution here with grub4dos; however a 3rd level of booting with grub2 might be useful as SystemRescueCD offers various options in a grub2 boot screen -one can see it in burning and booting it with a CD-; but for that I should be able to boot grub2 with grub, etc. another story...)

 

(1)  (with exctracted content from the iso... so not really booting the iso directly)

# ----------------------------------------------------------------
# copy & launch content of SysResCD on a HD partition, solution given on SysResCD tutorial
# working example of booting with files extracted from iso; however requires moving some files
# the 2 key files (kernel, initrd) have to be recopied into the subdir
# besides here a 3rd key file sysrcd.dat must be identified (requires/solved hereunder with: subdir)
# only weak advantage vs booting directly iso is the mem upload or contiguous data need (error 60)
# pb of unstable booting (black screen sometimes) ???
# source: http://www.sysresccd...eCd_on_harddisk
title Gentoo Xfcd SystemRescueCd
find --set-root /sysrcd/rescue64
kernel /sysrcd/rescue64 subdir=sysrcd setkmap=fr dostartx
initrd /sysrcd/initram.igz

 

(2) (in just recopying the .iso file into a separate partition, in a file named 'sysrcd')

# ----------------------------------------------------------------
# see http://reboot.pro/to...-with-grub4dos/
# issue with sysrcd.dat : required once kernel launched, but Linux can't get the file's path ?! above 'subdir' doesn't work
title Gentoo Xfcd SystemRescueCD
graphicsmode -1 1024 768 8:32
set iso1=/sysrcd/systemrescuecd-x86-3.4.2.iso
set b1a=/isolinux/rescue64
set b1b=/isolinux/initram.igz
find --set-root --ignore-floppies %iso1%
map --mem %iso1% (0xff)
map --hook
root (0xff)
kernel %b1a% boot=/sysrcd iso-scan/filename=%iso1% isoloop=%iso1% setkmap=fr dostartx
# suppressed here at the end: quiet splash -- (n.b. on forums people wonder why these 2 --)

 

 

nota:

I played a bit with the coding above, in using variables, for learning/testing grub4dos (so no need to recopy these long iso file names), or graphics, etc; a good manual for grub4dos is here http://www.rmprepusb...orials/grub4dos (had a hard time findig it !)

if you want nice colors in your boot window with menu.lst just copy, on top of the page:

color normal=0x0c highlight=0x1e helptext=0x0D heading=0x0A standard=0x0b border=0x01

key point, more seriously: the idea for solving the big issue of the file sysrcd.dat, with 'isoloop' just came from reading the code given for grub2 in the above mentioned SystemRescueCD online manual (see above link); I was a bit desperate in trying various things here to boot this iso with grub4dos in staying simple... and was rather suprised to see this work (well, this is great... but so not too clear for me what is the added value of grub2 vs grub or grub4dos after all ? behind the hood, seems rather similar ? or maybe 'neogrub' is some kind of new species as its name indicates ? all that remains rather mysterious to me for the moment ... and for many others I have the feeling !)

other ideas also for (2) came from code given on this site for booting directly ISOs for other Linux distros, but I won't recopy them all here, the ones which worked for me with recent iso versions of various distros, it would be off-topic (and some are still under  testing) (if I have time one day I'll post them somewhere else on the site if I see something useful/new)

 

that's all folks, it works !



#15 cestmoi

cestmoi
  • Members
  • 4 posts
  •  
    France

Posted 20 March 2013 - 11:30 PM

ooops, last line was missing here:

 

# ----------------------------------------------------------------
# see http://reboot.pro/to...-with-grub4dos/
# issue with sysrcd.dat : required once kernel launched, but Linux can't get the file's path ?! above 'subdir' doesn't work
title Gentoo Xfcd SystemRescueCD
graphicsmode -1 1024 768 8:32
set iso1=/sysrcd/systemrescuecd-x86-3.4.2.iso
set b1a=/isolinux/rescue64
set b1b=/isolinux/initram.igz
find --set-root --ignore-floppies %iso1%
map --mem %iso1% (0xff)
map --hook
root (0xff)
kernel %b1a% boot=/sysrcd iso-scan/filename=%iso1% isoloop=%iso1% setkmap=fr dostartx
# suppressed here at the end: quiet splash -- (n.b. on forums people wonder why these 2 --)
initrd %b1b%



#16 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 20 March 2013 - 11:33 PM

Thanks for sharing :good: 

Did you try the partnew method - see Tutorial 96 for an example - works with most linux ISOs and no need to use cheat codes.

Or try Easy2Boot for a multiboot USB drive that you can just drop all linux ISOs and Win install iso onto and boot to them.



#17 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 21 March 2013 - 12:09 AM

yep - systemrescuecd works fine with Easy2Boot - just drop it into \mainmenu folder.

 

Or to add to your own grub4dos USB stick use:

title systemrescuecd-x86-3.4.2.iso
#enable parttype output
debug on
# make empty table entry in 4th position in ptn table
parttype (hd0,3) | set check=
debug off
set check=%check:~-5,4%
if "%check%"=="0x00" partnew (hd0,3) 0 0 0
if not "%check%"=="0x00" echo WARNING: PTN TABLE 4 IS ALREADY IN USE! && pause && configfile /menu.lst
debug on 
map /systemrescuecd-x86-3.4.2.iso (0xff) 
map --hook 
partnew (hd0,3) 0 /systemrescuecd-x86-3.4.2.iso 
root (0xff) 
chainloader (0xff)

 

#WARNING: This destroys the 4th partition (if any) on the USB boot drive - make sure it is not used!
#2013-03021: Edited to add Wonko's check for unused partition!
 


#18 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 21 March 2013 - 10:20 AM

WARNING: This destroys the 4th partition (if any) on the USB boot drive - make sure it is not used!
 
Which - as always - translates to:
 
:cheers:
Wonko
 


#19 steve6375

steve6375

    Platinum Member

  • Developer
  • 7566 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films
  •  
    United Kingdom

Posted 21 March 2013 - 10:40 AM

code edited to suit Wonko!



#20 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 16066 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 21 March 2013 - 11:59 AM

code edited to suit Wonko!

Possibly if a newer/newish version of grub4dos is used (as soon as it becomes "featured"), with the ;; maybe it is possible to simplify the checK, making it a one liner?

Would something *like* this:

 

 



parttype (hd0,3) | check= ;; if not "%check:~-5,4%"=="0x00" echo WARNING: PTN TABLE 4 IS ALREADY IN USE! && pause && configfile /menu.lst

do?

 

Also, maybe in a future release it could be asked to have parttype output to %?% the partition ID?

 

:cheers:

Wonko



#21 cestmoi

cestmoi
  • Members
  • 4 posts
  •  
    France

Posted 21 March 2013 - 07:50 PM

tested again... what makes my above code simpler...

 

in above line:

kernel %b1a% boot=/sysrcd iso-scan/filename=%iso1% isoloop=%iso1% setkmap=fr dostartx

 

no need of :   iso-scan/filename=%iso1%

isoloop seems enough

 

so the code, in its simplest expression becomes (setkmap=fr dostartx are optional, just a way to boot faster; and the rest above was cosmetic):

 

 

title Gentoo Xfcd SystemRescueCD
set iso1=/sysrcd/systemrescuecd-x86-3.4.2.iso
set b1a=/isolinux/rescue64
set b1b=/isolinux/initram.igz
find --set-root --ignore-floppies %iso1%
map --mem %iso1% (0xff)
map --hook 
root (0xff) 
kernel %b1a% isoloop=%iso1% setkmap=fr dostartx
initrd %b1b%
 
 
 


#22 cestmoi

cestmoi
  • Members
  • 4 posts
  •  
    France

Posted 21 March 2013 - 09:07 PM

sorry, I'm a bit slow off the mark (the French esprit d'escalier)... still here testing various distros + this above SystemRescueCD

 

not sure it's just 100% cosmetic and my little amateurish R&D may be useful for others:

I added edd=off in my kernel line above; in testing in this kernel line a vga=xyz just to minimize what was displayed on my screen when Linux kernel started booting to try to see better these boot messages, I found out that one may get stucked with this Linux 'edd' thing  ('enhanced disk drive', just googled that)... booting could get stucked/stopped with a 'Probing EDD (edd=off to disable)' message and then a list of proper video modes to chose, etc. if the the above xyz wasn't right !

note: the xyz possible numbers could be found here http://en.wikipedia....eo_mode_numbers

 

conclusion what worked for here, and I got what I wanted + edd=off seems even to make the boot a bit faster (any consequences ?):

 

...

kernel %b1a% isoloop=%iso1% vga=773 edd=off setkmap=fr dostartx

...






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users