LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   write an iso boot sector and all to HDD partition (https://www.linuxquestions.org/questions/linux-general-1/write-an-iso-boot-sector-and-all-to-hdd-partition-605950/)

Person_1873 12-10-2007 10:38 PM

write an iso boot sector and all to HDD partition
 
i need to write an iso to a HD partition, the main reason is so that i can boot it from GRUB, i cannot boot CD's or PXE boot, the smart boot manager doesnt work either so can anyone tell me how to format a HDD partition to ISO9660 format, or write not only the files but the boot sector of an iso image to a normal HDD partition?

unSpawn 12-11-2007 01:47 AM

Being able to boot CDR/DVD (apart from the BIOS setting) means the BIOS and CDR/DVD drive being able to read a (1.4 or 2.8MB) El Torito. If your system doesn't recognise it then it won't recognise it as one if you write it to HD so "formatting a HDD partition to ISO9660 format" won't work. What removable media can the box handle? Doesn't it contain a floppy drive?

Person_1873 12-11-2007 04:11 AM

it has both a cd/dvd-rw drive and a floppy drive, i cannot boot the cd because of special circumstances, i want to use grub to chainload an iso image but grub doesnt have cd support so i therefore need to be able to chainload an HDD partition to boot a cd image, i know what i'm talking about here and i prefer not to go into the nitty gritty details

when i said "i know what i'm talking about here" i meant about that my computer could boot a cd/dvd if i had a floppy or an HDD partition that could point my system to my cd/dvd-rw drive, due to having no onboard IDE connections that work, i'm currently using a Promise technologies ultra100 IDE PCI card (ie. it turns a PCI slot into 2 IDE connections) it has no cd-booting support, i'm getting a new MB soon anyway but i need to be able to boot this maimed system with a new OS

JZL240I-U 12-12-2007 10:45 AM

Hey unSpawn ;) couldn't he copy the DVD/CD with "dd" to the hard disk and then mount it in a loop device? Sorry to ask like this but I have no idea whether and how it would work...

unSpawn 12-12-2007 12:14 PM

He says he knows what he's talking about so he'll probably try it anyway :-]
I wonder what he how he can losetup the image at GRUB-time though...

JZL240I-U 12-13-2007 01:03 AM

Quote:

Originally Posted by unSpawn (Post 2988509)
He says he knows what he's talking about so he'll probably try it anyway :-]

:D
Quote:

Originally Posted by unSpawn (Post 2988509)
I wonder [...] how he can losetup the image at GRUB-time though...

Oooops. I didn't think of that one ... is it at all possible to do that?

unSpawn 12-13-2007 01:55 AM

If you're the Chuck Norris of GNU/Linux, sure.

JZL240I-U 12-13-2007 02:56 AM

Quote:

Originally Posted by unSpawn (Post 2989112)
If you're the Chuck Norris of GNU/Linux, sure.

:D ;)

Pity, though. I have the iso images of my installation CDs on my hard disk and I would like to be able to install for testing from there :(.

saikee 12-13-2007 09:53 AM

Here is the ticket.

And that is how it can be applied to a USB device. Booting off from a hard disk is even easier. Make sure you read Post #5.

A few inaccuracies here.

(1) If this statement "i know what i'm talking about here and i prefer not to go into the nitty gritty details" is correct then you should know "to format a HDD partition to ISO9660 format" is impossible.

(2) The statement "grub doesnt have cd support" is incorrect because stage2_eltorito in Grub can be used to boot any CD and DVD. The above link proves Grub can be used to boot CD/DVD. It has been inside Grub for donkey years!

An iso file can be booted from any hard disk including USB device but it requires the following

(1) You need a Linux or a Windows to expand the iso file into a normal filing system first.

(2) You need to substitute isolinux with Grub. The above links show plenty examples.

unSpawn 12-13-2007 11:29 AM

Nice solution!

JZL240I-U 12-14-2007 02:45 AM

Thanks a load, saikee. I looked for this since quite some time (http://www.linuxquestions.org/questi...ssible-566302/).

I'll give your solution a try for sure.

Person_1873 12-19-2007 12:50 AM

ok sorry i was under the impression that eltorito was supposed to be loaded onto a CD so that when you booted a CD it loaded up GRUB... could someone give me some direction on how to install eltorito on my HDD MBR?

here's the grub config with machine specific data made obvious
Code:

title Ubuntu 7.10 Live CD
kernel /casper/vmlinuz append  file=/preseed/ubuntu.seed boot=casper
initrd /casper/initrd.gz quiet splash cdroot=/dev/hdf1 --

replace cdroot=/dev/hdf1 with cdroot=/dev/the partition that contains your extracted ISO

also the partition MUST be in ext3 format not ext2 otherwise the kernel doesn't like it

saikee 12-19-2007 02:17 AM

As its name implies stage2_eltirto is not applicable for a hdd. Use the normal stage1 and stage2 instead.

Person_1873 12-19-2007 08:27 AM

well thanks for the link anyway saikee, i've now managed to boot and install Ubuntu 7.10 from the live CD using a grub boot floppy i made as a backup incase i screwed my MBR (which i did) and all is well

Person_1873 12-19-2007 08:29 AM

btw, initially i was looking for a way to boot a Win XP iso (plz dnt hurt me) if anyone knows of a way to do this using grub, please let me know

JZL240I-U 12-19-2007 08:59 AM

You have to start the ntldr (NT-loader). Try it from the boot prompt of GRUB I'd suggest. Set root and Kernel parameters for your drive with the iso then chainload +1 and boot. See also here:

http://www.troubleshooters.com/linux/grub/grub.htm
http://www.tldp.org/HOWTO/Linux+Win9x+Grub-HOWTO/
http://www.linuxquestions.org/questi...41#post1208741
http://www.gnu.org/software/grub/manual/
http://www.mcc.ac.uk/grub/grub_toc.html
http://www.tldp.org/HOWTO/Multiboot-with-GRUB.html

saikee 12-19-2007 09:39 AM

This is uncharted territory as M$ do not have iso for download. The OS always comes as an installable CD. Earlier free downloadable versions would have exppired the sell-by date.

I am aware of that there has been people boot up a Dos (off Win9x) first and just run the setup.exe from the expanded filing system instead. The OEM version of XP is not transferrable but licensed to die with the PC. Moving it out to another PC is both technically impossible (activation) and illegal.

As far as I am aware Grub cannot read a NTFS partition. Grub can only boot a Win2k, XP or Vista by booting up its boot loader and hands over the control. This means the Windows must have been installed and has a boot loader sitting in the boot sector of the partition ready to be chainloaded.

Thus I doubt if Grub, or Lilo, can boot up XP held as a iso file in a hard disk, as technically it doesn't make sense to me.

Person_1873 12-20-2007 09:14 AM

right thanks, i'll see what i can do from the info you've given, i'd need to edit boot.ini to recignise the hdd partition as the cd drive too...

Person_1873 12-20-2007 09:16 AM

perhaps i could install 98 then install xp off 98? i know 98 would get unstable but i can drop my cpu speed


All times are GMT -5. The time now is 04:03 AM.