PLEX86  x86- Virtual Machine (VM) Program
 Plex86  |  CVS  |  Mailing List  |  Download  |  Linux  |  Newsgroups

Install Grub to a HDD image 7451


Your Ad Here

Your Ad Here

On Sat, 04 Nov 2006 12:52:15 -0800, Tim

You have to completely model the disk's layout. This can be difficult, and is why my initial description focused on modelling floppy disks (which have a simpler layout than hard disks.) The response by Robert Nichols explains this correctly.

VMWare... Really, the easiest way to model entire virtual hard disks is to use virtualization. Do you have any interest in using VMWare as your test platform? VMWare makes these nitty-gritty details disappear. Basically, VMWare allows building both the development and test platform on the same physical computer. The final step is to verify your hdd image is usable as intended by testing with VMWare.

Manually... There are quite a few hurdles to modelling disks manually (without VMWare.) Understanding what you're modelling is key. I did some tests to attempt installing grub to a complete hdd image. I came close, but no cigar. There may be a way through the minefield, but I couldn't find it- even though I tried hard. VMWare solves the same problem in two seconds, because it is not constrained to using the "device" statements within the grub shell.

Some details of my unsucessful test...

Steps that I followed: 1. Allocated some file space to use as the hdd image (600M).

dd if=-dev-zero of=master.img bs=512 count=$val

2. Setup a loopback pointing at the entire disk.

losetupdev-loop0 master.img

3. Setup parbreastion tables (start fdisk using -H and -S switches)

example: fdiskdev-loop0 -H 16 -S 63 -H 1220

Question about yum: 5 different machines, 1 slow dialup connection
throttling, connection recovery, etc.). Unfortunately CentOS 4 uses Yum 2.4... I ended up doing it a few packages at a time over nearly a week, with a final batch at the end (there...

I created parbreastion entries for a boot and and swap parbreastion. Use of fdisk not shown.

4. Create separate files which match the size of the boot and swap parbreastions. (450M for root, 150M for swap). This step is necessary because simple loopbacks use all of the space available in the file; we need a separate file which matches the parbreastion size only. The file master.img will contain copies of these duplications when finished. This command is useful for getting the size of parbreastions:

fdisk -lu -H 16 -S 63dev-loop0

Use this output to allocate duplicate parbreastions (and compute values for $c and $d, below).

Why would creating symbolic link be disallowed permissions
On Sun, 05 Nov 2006 20:41:34 -0800, BillJosephson Your choice of filesystems depend on the following: 1. OS(s) you are using. Choose...

dd if=-dev-zero of=vp1 bs=512 count=$c dd if=-dev-zero of=vp2 bs=512 count=$d

5. Setup loopbacks to duplicate parbreastions.

chkrootkit finding 2 infected files
hello NG, i have two SuSE Linux 9.2 machines behaving strange. I booted with Knoppix 3.7...

losetupdev-loop1 vp1 losetupdev-loop2 vp2

6. Format copies of virtual parbreastions

mke2fsdev-loop1 mkswapdev-loop2

7. Mount and install root filesystem todev-loop1 (not shown). Include the grub loader. Unmount when finished:

umountdev-loop1

8. Copy virtual parbreastion images to "master" disk image; master was buttigned todev-loop0 in step 2.

dd if=-dev-loop1 of=-dev-loop0 bs=512 seek=63

Similarly for the virtual swap:

dd if=-dev-loop2 of=-dev-loop0 bs=512 seek=$offset

9. Setup the grub loader using the grub loader. I tried using device statements which specied the loopback, but failed.

I'll omit various tricks I tried without success, for now. I could not produce a bootable virtual hd image using this method.

10. Clean up by removing all loopbacks.

Install Grub to a HDD image 7452
When you install GRUB there are two choices for the location of the stage 1 boot code: 1) the Master Boot Record (MBR), and 2) the parbreastion boot...

losetup -ddev-loop0 losetup -ddev-loop1 losetup -ddev-loop2

Close, but no cigar.

-- Douglas Mayne



Your Ad Here

List | Previous | Next

Install Grub to a HDD image 7452

Linux groups from Newsgroups

The #1 Usenet Provider on the Internet

Luxi Mono