1

I've got two HDD image files, which both of have 2 partitions each.

On each image, the first partition is the grub boot partition, and the second partition contains the files and kernel. The second partition on the first image contains a 2.4 kernel, and the second partition on the second image contains a 2.6 kernel.

I'm trying to put them onto one drive, so that I can choose to boot either the 2.4 kernel and files or the 2.6 kernel and files.

I have written the first image onto a drive, and then used gparted to copy the second partition from the second image onto the drive, so that it now has 3 partitions (grub, 2.4, 2.6).

I have added a grub boot entry using (hd0, 2) as the partition for root, kernel etc. and added root=/dev/hda3 to what I beleive is called the cmdline.

The first grub entry works for the first partition, but when trying to run the second entry it boots up, but seems to fail to be able to access any of the files and gives a DMA error when checking /dev/hda. The application then fails as it can't write or read certain files.

If I try this the other way round, by imaging the second image first, and then adding the partition from the first image second, the same error happens where I can boot the first image I wrote, but not the copied over partition.

I'm trying this on a very closed system running kernels 2.4/2.6 so I'm limited to how much digging I can do, but would be able to read the specific DMA error by taking a picture later if that is required.

1

I have figured out the issue, and although it is an unusual one it might help people trying to work on embedded systems, written as badly as the one I'm working with.

When booting, the initrd (initial ram disk) image gets mounted and a file called linuxrc in the root of that gets run. This file is responsible for mounting the HDD partitions and getting the OS started. In my case, the line that would normally mount whatever partition was defined in cmdline as root= was commented out, and a line that always statically mounted /dev/hda2 was added in, which is likely why it wouldn't boot.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.