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 11: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 02: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 05: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 11: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 01: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 02: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 02:55 AM

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

JZL240I-U 12-13-2007 03: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 10: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 12:29 PM

Nice solution!

JZL240I-U 12-14-2007 03: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 01: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 03: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 09: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 09: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


All times are GMT -5. The time now is 05:47 PM.