Jump to content











Photo
- - - - -

Help with multiboot project (newbie alert)


  • Please log in to reply
78 replies to this topic

#1 Shoshi

Shoshi

    Member

  • Members
  • 54 posts
  •  
    United States

Posted 22 February 2016 - 11:52 PM

If this is in the wrong section, I do apologize! 

 

I had a computer issue a month ago and fortunately a rescue disk helped! Since then, I have wanted to make my own custom multiboot rescue disk/usb.

 

I have spent weeks looking at all sorts of forums and trying all kinds of tools (SARDU, SharpBoot, XBoot, YUMI, etc) to make the multiboot compilation. They all have their pluses and minuses. I plan on having Windows 10PE (which I made using winbuilder). A Xubuntu live cd, Bitdefender, Comodo, Eset, and possibly Kaspersky rescue cds as well. Some tools get Bitdefender to work but end up with Eset not working and vice versa.

 

I ended up taking the general layout from the ISO that winbuilder makes with Grub4Dos and GfxBoot. I was then able to use a lot of the syntax that WinsetupFromUSB uses to get Linux isos to boot. It all works on the USB drive. But when I try to boot the ISO image there are issues.

 

The menu loads fine. I but when I try to launch any of the antivirus rescue cds I get this.

224 (HEX:0xE0)
Filesystem type is udf, partition type 0x00
224 (HEX:0xE0)
Warning: PARTITION TABLE 4 IN BIOS DEVICE 224 IS ALREADY IN USE!

To prevent possible data loss will not continue further 

The fact that it works on the thumb drive is great but it would be nice if it worked as an ISO image too. I am new to all of this so if I missed something just ask. I am sure I am missing something simple that will fix this that I just cannot figure out.


Edited by Shoshi, 23 February 2016 - 12:04 AM.


#2 memoarfaa

memoarfaa

    Member

  • Members
  • 81 posts
  •  
    Egypt

Posted 23 February 2016 - 01:23 AM

that because of you have 4 primary partitions in your USB drive 

see here 

http://www.easy2boot...roubleshooting/

 

'WARNING: PTN TABLE 4 IS ALREADY IN USE!' - Easy2Boot needs the last (4th) primary partition entry to be empty in order to boot linux ISOs. Delete the 4th Primary partition (you will be prompted to do this) or re-partition the USB drive so that you have two Primary partitions or just one Primary partition and any number of Logical partitions.

 



#3 Shoshi

Shoshi

    Member

  • Members
  • 54 posts
  •  
    United States

Posted 23 February 2016 - 01:32 AM

that because of you have 4 primary partitions in your USB drive 

see here 

http://www.easy2boot...roubleshooting/

 

'WARNING: PTN TABLE 4 IS ALREADY IN USE!' - Easy2Boot needs the last (4th) primary partition entry to be empty in order to boot linux ISOs. Delete the 4th Primary partition (you will be prompted to do this) or re-partition the USB drive so that you have two Primary partitions or just one Primary partition and any number of Logical partitions.

 

Thanks for the fast reply! :) My googling brought me to that page before I posted this and I experimented with easy2boot as well. I do not get the error on the USB drive, Only when I packaged it back into an ISO does the error happen. I m a newbie and I do understand that there is a file format difference between the USB drive (mine is formatted fat32) and the format of an ISO file. 

 

Is the error because the ISO image does not have the 4th partition? I guess I am confused about what changes I need to make to get it to work like it does on the USB and as an ISO file as well,


Edited by Shoshi, 23 February 2016 - 01:33 AM.


#4 steve6375

steve6375

    Platinum Member

  • Developer
  • 6937 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 23 February 2016 - 07:57 AM

ISOs do not have partitions. You cannot use E2B or partnew on a CD or ISO.

If you try to use partnew when booting from a CD then you can destroy partitions on your hard disk because hd0 will be your hard disk and not the USB boot drive!



#5 Shoshi

Shoshi

    Member

  • Members
  • 54 posts
  •  
    United States

Posted 23 February 2016 - 08:18 AM

Thanks for the reply! I have only tested in virtual machines so I am ok! 

 

I do like E2B, but for what I wanted I found it a bit too much. I want a good looking (hence the GFXBoot) tool to boot Windows 10PE, 2 or 3 antivirus rescue disks, and 2 of Ubuntus Minimal text based installers. I have tried so many multiboot tools and one thing or another messes it up. 

 

I am willing to make changes to the commands used in Grub4dos if it would work in both the ISO and on a USB. I am just stuck...



#6 steve6375

steve6375

    Platinum Member

  • Developer
  • 6937 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 23 February 2016 - 12:04 PM

As you have found, making something that will work both as a USB drive and a CD\DVD is tricky.

Personally, I would go for a grub4dos-based solution (you can use GFX Boot if you wish).

I would test the menu entries from a USB drive first and then use the RMPrepUSB feature to convert the grub4dos USB drive to an ISO.

I would then test the ISO on a VM (e.g. VBox or QEMU).

You will need to craft the menu entries carefully and will probably need to understand how each one needs to be loaded.

 

If you want to use an existing utility, it needs to be designed to generate an ISO file (e.g. XBoot). A USB-only tool will not make the correct menu entries to run as a CD/DVD.

 

You can use E2B to make an ISO, but you will need to create your own .mnu files rather than use the standard E2B features.

 

You can find lots of grub4dos menu examples and tutorials on my RMPrepUSB site.



#7 Shoshi

Shoshi

    Member

  • Members
  • 54 posts
  •  
    United States

Posted 23 February 2016 - 02:02 PM

Indeed  Steve! And thanks again for replying!

 

This is basically what I did. I have tried both Sardu, xboot, and sharpboot to make iso files, but they fail to make the ISOS from Bitdefender, ESET, or Kaspersky work. As such I have basically made my own Grub4DOs setup and it does work pretty well on the USB. I just know that the G4D command arguments I am using are not ideal and could probably be adjusted to work in both a USB and an ISO. I have read several of your articles and I get lost.

 

 

To boot these antivirus discs I basically ripped the arguments that WinSetupFromUSB uses to make a multboot USB. I have it on a file called antivirus.lst which is a submenu off menu.lst.

 

Here is the code for ESET

title ESET SysRescue from partition 0
map --unmap=0:0xff
map --unhook && map --rehook
cat --hex --locate=PoLPu@ (md)0x3D0+0x130 > nul && echo Cannot continue if PLoP is active, please start this entry without loading PLoP first && echo && pause Press any key to return to the main menu && configfile /menu.lst
set /a dev=*0x8280&0xff
root (%dev%,0)
set ISO=/ISO/eset.iso
ls %ISO% > nul || find --set-root --devices=hf /usbdrive.tag|| echo Error! Could not find usbdrive.tag && echo  && pause Press any key to return to the main menu && configfile /menu.lst
ls %ISO% > nul || find --set-root --devices=hf %ISO% || echo Error! Could not find %ISO% && echo  && pause Press any key to return to the main menu && configfile /menu.lst
map %ISO% (0xff) || map --heads=0 --sectors-per-track=0 %ISO% (0xff) || echo FATAL ERROR mapping %ISO%, please check if file is present and defragmented && pause Press any key to return to main menu && configfile /menu.lst
#http://reboot.pro/topic/9916-grub4dos-isohybrided/page-2#entry88531
#http://www.rmprepusb.com/tutorials/tails
set /a dev=*0x82a0&0xff
debug 1
parttype (%dev%,3) | set check=
debug off
set check=%check:~-5,4%
if "%check%"=="0x00" partnew (%dev%,3) 0 0 0 && partnew (%dev%,3) 0x00 %ISO%
if not "%check%"=="0x00" echo WARNING: PARTITION TABLE 4 IN BIOS DEVICE %dev% IS ALREADY IN USE! && echo  && echo To prevent possible data loss will not continue further && pause && configfile /menu.lst
map --rehook
root (0xff)

As you can see it is quite long and it borrows information from you!



#8 steve6375

steve6375

    Platinum Member

  • Developer
  • 6937 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 23 February 2016 - 02:36 PM

That uses partnew so it won't work with a CD. WinSetupFromUSB  (there is a hint in the name!!!!) is not designed to run from a CD.

 

What you may find useful is the ISOBOOT code used in E2B.

 

For instance, you can boot from the eset-sysrescue.1.0.9.0.enu.iso file in E2B by holding down the SHIFT key when you press ENTER.

This makes E2B use ISOBOOT instead of partnew.

The code used by ISOBOOT can be found at \_ISO\e2b\grub\ISOBOOT.g4b

It works by recognising the file name of the ISO file.

There is a list of ISOs which work with ISOBOOT here.

 

With the latest version of E2B 1.77, if you convert it to a CD, it should automatically run ISOBOOT (though I haven't tested that).

 

Or you can use the ISOBOOT.g4b file, or pull out the code from it.

 

ISOBOOT is for linux ISOs, though it could be adapted to recognise other ISOs.

 

e.g. if you had the E2B files on your USB drive or CD, you could have a menu

set ISOC=/ISO/someiso.iso

call /_ISO/e2b/grub/isoboot.g4b

 

As I said, you should use a utility that is designed to generate an ISO file if you want to use their menus. WinSetupFromUSB is totally the wrong choice!

 

HTH

Steve



#9 Shoshi

Shoshi

    Member

  • Members
  • 54 posts
  •  
    United States

Posted 23 February 2016 - 04:00 PM

I completely understand. Like I said, I did try three other tools that make ISO files but they have issues themselves. I will check out that g4b file to see what I can see. I did look at http://www.easy2boot...4dos-usb-drive/

but I guess I am still not knowledgeable enough to understand and utilize the instructions. 

 

Would call /_ISO/e2b/grub/isoboot.g4b be used in a menu.list kind of file? 



#10 Shoshi

Shoshi

    Member

  • Members
  • 54 posts
  •  
    United States

Posted 23 February 2016 - 11:02 PM

I tried using isoboot.g4b in a lst file and I get a an error.
 
I added the following to antivirus.lst
 
set ISOC=/ISO/bitdefender.iso
call /isoboot.g4b
 
I moved isoboot to the root of the project to just see what happens.
 
I ended up with this message.
 
ISBOOT: Trying to identify a linxu ISO filname bitdefender...
 
Sorry  /ISO/bitdefender.iso is not supported by ISOBOOT


#11 steve6375

steve6375

    Platinum Member

  • Developer
  • 6937 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 23 February 2016 - 11:16 PM

Well, that shouldn't come as a surprise, since it is not in the list of ISOs recognised by ISOBOOT that I gave you in the link!

ubuntu
linuxmint (linuxmint-cinnamone 17.1 64-bit 'Rebecca')
fedora (not NTFS or exFAT)
kali
opensuse (not NTFS or exFAT)
systemrescue
knoppix
debian
tails
gparted
centos
arch (user will be prompted for 32-bit or 64-bit boot, if dual ISO detected)
zorin
pclinux (not NTFS or exFAT)
avg
porteus
slax
slackware
makulu
antix
crunchbang
acronis
paladin
Parted Magic
Voyager (ensure the string 'ubuntu' is in the filename e.g. Voyager-14.04.04-amd64_ubuntu.iso)
ophcrack - ensure \tables folder exists on E2B drive and use notables ISO (v1.77+)

Read more: http://www.easy2boot...-payload-files/



#12 Shoshi

Shoshi

    Member

  • Members
  • 54 posts
  •  
    United States

Posted 23 February 2016 - 11:22 PM

My apologies! I am still very new at this.

 

I do not know what cheat codes get for example Bitdefender to work , other than using the codes that WinSetupFromUSB uses which as we both know is not for ISO files. So modifying the b4d file to suit is beyond my scope so far. This is why I am asking for help because even though I have spent days googling and reading stuff I am stuck.



#13 steve6375

steve6375

    Platinum Member

  • Developer
  • 6937 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 23 February 2016 - 11:24 PM

http://www.rmprepusb...-as-an-iso-file

 

This may not work for recent versions though!


Edited by steve6375, 23 February 2016 - 11:27 PM.


#14 Shoshi

Shoshi

    Member

  • Members
  • 54 posts
  •  
    United States

Posted 23 February 2016 - 11:44 PM

It does not work. Is there a way to look at the structure and files in the Bitdefender ISO itself that will give me information about what codes will work?

 

There's a grub.cfg file that has the following code in the ISO.

insmod exfat
insmod fat
insmod iso9660
insmod ext2
insmod ntfs

source ${prefix}/${platform}/loadvideo.cfg

insmod font
if loadfont ${prefix}/fonts/unicode.pf2 ; then
	set gfxmode=1024x768x24,1024x768x16,auto
	set gfxpayload=keep

	insmod gfxterm
	if terminal_output gfxterm ; then
		true
	else
		terminal gfxterm
	fi

	if insmod png ; then
		background_color 0,0,0,0
		if [ -f "${prefix}/theme/theme.txt" ] ; then
			if [ -f "${prefix}/theme/theme.cfg" ] ; then
				source "${prefix}/theme/theme.cfg"
			fi
			set theme="${prefix}/theme/theme.txt"
		else
			background_image -m stretch ($root)/rescue/bootsplash.png
			if [ -f "${prefix}/pack.cfg" ] ; then
				source "${prefix}/pack.cfg"
			fi
		fi
	fi
fi

set SQUASHFILE="/rescue/livecd.squashfs"

if [ -z $net_default_ip ]; then
	set kopts_common="root=/dev/ram0 real_root=/dev/loop0 loop=${SQUASHFILE} cdroot_marker=${SQUASHFILE} initrd udev cdroot scandelay=10"
else
	eval "set nfsroot=\${net_${net_default_interface}_rootpath}"
	if [ -z $nfsroot ]; then
		echo "Your DHCP configuration is incomplete, please add 'option root-path' to your configuration file"
		echo "The system will reboot in 60 seconds"
		sleep --verbose --interruptible 60
		reboot
	fi
	set kopts_common="root=/dev/nfs real_root=/dev/nfs nfsroot=${nfsroot} ip=${net_default_ip} loop=${SQUASHFILE} looptype=squashfs livecd.nfsif=${net_default_mac} initrd udev cdroot"
fi
set kopts_silent="quiet splash"

source ${prefix}/menu.cfg.${platform}



#15 steve6375

steve6375

    Platinum Member

  • Developer
  • 6937 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 24 February 2016 - 12:21 AM

title Bitdefender Rescue CD 2014 (ISO file 0xff)
set ISOfile=/_ISO/Linux/Bitdefender-rescue-cd.iso
map %ISOfile% (0xff)
map --hook
root (0xff)
set SQUASH=rescue/livecd.squashfs
set common=root=/dev/ram0  real_root=/dev/loop0 loop=%SQUASH% cdroot_marker=%SQUASH% initrd udev cdroot scandelay=2
set silent=quiet splash
set silent=
set lang=en
kernel /boot/kernel.i386-pc %common% %silent% isoboot=%ISOfile% lang=%lang% vga=ask
initrd /boot/initfs.i386-pc
boot

This works, but NOT on an NTFS USB drive (FAT32 works).



#16 Shoshi

Shoshi

    Member

  • Members
  • 54 posts
  •  
    United States

Posted 24 February 2016 - 12:52 AM

I appreciate all of the help you have given me!

 

 

I have been building the old compilation on a USB drive because making quick change there is way faster than rebuilding an ISO in Ultraiso. I used a utility called Virtual Machine USB Boot to make my USB drive bootable in Virtualbox for testing and it has worked pretty well. Since I want my compilation to work as an ISO file too I started again and I have a very simple ISO layout.

 

Using your code it looks like it works at first. I do not see a Bitdfender bot menu, but it asks me to select a resolution. After that it starts booting until I see invalid loop location: rescue/livecd.squashfs


Edited by Shoshi, 24 February 2016 - 01:05 AM.


#17 steve6375

steve6375

    Platinum Member

  • Developer
  • 6937 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 24 February 2016 - 01:35 AM

DId you change the menu so it has the correct path for the ISO?



#18 Shoshi

Shoshi

    Member

  • Members
  • 54 posts
  •  
    United States

Posted 24 February 2016 - 01:42 AM

That's embarrassing... Everything was correct except the ISO name in the menu had a capitol B and the ISO was small. It works!  :) Thank you!

 

Is there a way for it to use the Bitdefender menu after selecting it from my menu? As it stands now, it asks me to select a resolution or skip it and then boots in verbose mode.



#19 steve6375

steve6375

    Platinum Member

  • Developer
  • 6937 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 24 February 2016 - 01:47 AM

just remove vga=ask and remove the  set silent= line

 

it will boot as if the first English menu option was selected.

for a different language, instead of en  use fr or de or es or tr or ptbr or ro 



#20 Shoshi

Shoshi

    Member

  • Members
  • 54 posts
  •  
    United States

Posted 24 February 2016 - 02:24 AM

It woks! Well, sort of... I removed the set silent= and the vga=ask and I got a loading screen but it looked messed up, I then added vga=0x344 for 1024x768 x32b and  the loading screen booted correctly! 

 

However the original Bitdefender loading menu does not show up. On http://www.easy2boot...les/linux-isos/You talk about how other multiboot software replaces the menu with their own. Is there anything to fix this?



#21 steve6375

steve6375

    Platinum Member

  • Developer
  • 6937 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 24 February 2016 - 01:27 PM

Because we are not using the ISO's boot files, we are also not using their boot menu.

So it is difficult to use their menu (often this uses grub2 or syslinux).

In the case of Bitdefender, it only offers the choice of different languages anyway.

I use vga=ask because when booting on different systems, the display is not always correct.

It is possible to 'chain' to syslinux or grub2 from grub4dos, but then it would use their menus which would be wrong, so you would have to change their menus and write you own in syslinux or grub2. Also, the required menu can change when booting from a CD.



#22 Shoshi

Shoshi

    Member

  • Members
  • 54 posts
  •  
    United States

Posted 24 February 2016 - 06:55 PM

You use the chainloader command do chainload syslinux? It looks like Bitdefender uses that. How hard would it be to do this?



#23 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 24 February 2016 - 07:51 PM

You use the chainloader command do chainload syslinux? It looks like Bitdefender uses that. How hard would it be to do this?

The issue is different.

 

There is no problem whatsoever in chainloading either syslinux or GRUB2 from grub4dos (they are as well linux kernels), the issue comes after, when these tools will look for their configuration files, such as syslinux.cfg or grub.cfg.

 

Things that may go wrong:

1) the configuration file is not found

2) the configuration file is found but it is written in such a way that assumes something about it's own locations/paths and devices.

 

To remain in grub4dos, to make an example, this:

title my first example

root (hd0,0)

chainloader /myexample

 

will work OK, but ONLY if the file is  in the device mapped as (hd0,0).

 

This one:

title my second example

find --set-root /myexample

chainloader /myexample

 

will work on *any* device.

 

So you need not only to chainload the "original" loader, but EITHER make sure that it can find its own configuration file and that the configuration files is "portable" OR duplicate the "original" loader and the configuration file on the writable media you are booting from and modify the configuration file in such a way that it finds and boot the target.

 

In some cases this is very easy, in some other cases it can be extremely difficult or impossible.

 

:duff:

Wonko



#24 Shoshi

Shoshi

    Member

  • Members
  • 54 posts
  •  
    United States

Posted 24 February 2016 - 10:44 PM

I suppose adding extra complexity when it now works is silly. 

 

This multiboot disk is really being a pain to get working, I am now having issues with ESET.  

 

ESET is based on Ubuntu 12.04. There is no preseed fle as far as I can see.

 

I have tried multiple strings to boot it and none have worked.

 

At first I tried this and I got (initramfs unable to find a medium containing a live file system)

title eset3
ls /iso/eset.iso || find --set-root /iso/eset.iso
map /iso/eset.iso (0xff)
map --hook
root (0xff)
chainloader (0xff)

So then I looked around and tried this set of strings

title Eset
find --set-root --ignore-floppies /iso/eset.iso
map /iso/eset.iso (hd32)
map --hook
root (hd32)
kernel /casper/vmlinuz boot=casper iso-scan/filename=/iso/eset.iso
initrd /casper/initrd.lz

There is no seed file at all. I run it verbose and after mounting casper-premount it then spits this out over and over again.

 

/init: line3: can't open /dev/sr1: no medium found

 

After around 20 seconds of this I am back at (initramfs unable to find a medium containing a live file system)



#25 steve6375

steve6375

    Platinum Member

  • Developer
  • 6937 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars, www.easy2boot.com
  •  
    United Kingdom

Posted 24 February 2016 - 11:26 PM

The latest version of E2B has a version of isoboot which works with eset-sysrescue, but you have to extract the whole casper folder and put it on the E2B usb drive in a \sysrescue folder. There is also a .mnu file for it too...

# eset 1.0.9 - need to extract casper to \sysrescue on E2B drive!  ISO cheat codes don't work!
# you can add quiet and splash to the kernel parameters if you wish and remove the vga=ask
# This does not seem to be persistent and creating an ext2 casper-rw file stops it from booting!
iftitle [if exist /sysrescue/casper/vmlinuz] Eset sysrescue (linux, flat file) \n Boot to Eset System Rescue
kernel /sysrescue/casper/vmlinuz  boot=casper persistent live-media-path=/sysrescue/casper vga=ask  --
initrd /sysrescue/casper/initrd.lz

you can remove the persistent and vga=ask if you like






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users