# Can't boot from CD! [SOLVED]

## Beetle B.

Where to begin?

First, just an idea about my hardware setup: I have 2 HD's. One is a regular IDE HD that contains both my Windows partition, and all the "important" Linux stuff (root, etc, usr, var, home). The other HD is an SATA one with some Linux partitions that I use as storage for other stuff (IDE HD was getting full). As my motherboard doesn't support SATA (old one), I had to get a SATA card that plugged into a PCI port (Silicon Image 3512A). 

So I have two HD's (main one is primary master), and on secondary I have a CD drive and a DVD drive.

Now my /etc and /root is on reiserfs. Everything else is handled via LVM (ext3 formatted). And here's where the trouble begins: When I put in the second SATA HD, I extended my logical group to include a partition in the SATA HD - so I have a logical group spanning more than one drive. 

This story begins with the lvm2 devmapper headache. 

Eventually, I removed dev-mapper and managed to upgrade to lvm2-2.02.51-r1. Somewhere in the whole process, udev was upgraded as well. udev warned me that my kernel was too old, and that I better upgrade to a newer one. 

So I dared not reboot until I had done so. I was quite busy for almost a month, so I just didn't reboot. Finally, managed to upgrade the kernel (2.6.30). I had a feeling that my work was not done because in the emerge @preserved-rebuild, it was still looking for devmapper, and couldn't find it. I never finished the rebuild. For other headaches not mentioned, I needed to turn off my computer today.

As you can guess, I've lost access to my LVM partitions. If I boot into the new kernel, I think udev fails. /dev is pretty bare. If I boot into the old kernel, it's a bit better, but LVM doesn't work ("Unable to find sysfs mount point"). So again, no access to my data. 

Now, that's just the background.  :Twisted Evil:  Here's my real problem:

I can't easily boot off of a CD (e.g. Knoppix). I'm sure that either the SATA HD or the SATA card is preventing this from happening. If I unplug the SATA HD, I can boot into, say, Knoppix. But the real problem then is that I can't get to my LVM partitions because the main logical group spanned both HD's. 

I'm going to try to do a Flash update on the SATA PCI card to see if that will allow booting from a CD. But my question is: Can I find a way to access the stuff in the LVM partition (and chroot into it) without the SATA HD? All the important stuff/partitions are on the connected HD. 

Can I somehow temporarily restrict the logical group to one HD without losing the data on the SATA HD? 

I can't begin to solve the LVM2 and UDEV/Kernel problems until I can solve this.

Edit:Changed logical volume to logical group...

----------

## Hu

Can you PXE boot the system?  That would allow you to come up with an external Linux system without needing your CD drive to work.  Alternately, do you have a swap partition you could temporarily destroy to make room for installing a recovery image onto the hard drive?  If not that, what about shrinking the Windows partition to make room for a recovery system?  Use ntfsresize to shrink the NTFS, then use a partition editor to shrink the Windows partition.

----------

## Beetle B.

 *Quote:*   

> Can you PXE boot the system?

 

Haven't tried. Don't know how.

My swap partition is about 1.5 GB. It's an interesting idea. What distribution would you recommend that would fit in it and would detect the Internet automatically (simple dhcp) and also have LVM tools? I'd really like Knoppix as I'm familiar with it, but am not sure it will fit. (Perhaps it should as the CD is only 700 MB...?)

As for shrinking the NTFS solution: Not sure it will work. Actually, my IDE HD has 20-30 GB unused (not partitioned). It's right after the Windows partition. But cfdisk states that that space is unavailable - I think there's a limit to the number of partitions or something and I've used them up. So even if I could shrink the partition, I'm not sure I can make use of the space I save.

Also wondering if getting another SATA adapter would solve the problem...?

Finally, (and this was the real question): is there really no way to access the data in the one HD when the volume group spans more than one HD? No "logical partition" spans two HD's - just the group. So all the "partitions" I need access to are definitely on the one IDE HD.

The supremely irritating thing about all this is that I have to move across the country in a few days, and ship my computer. It hurts not having access to my data (a lot of the moving arrangements were there, and I may have to duplicate). Once I get there, it'll be a bigger pain to fix this. In any case, I guess if I don't get it worked out in a day or two, I may have to resume this discussion some weeks later.

----------

## drescherjm

I would create a bootable sysrescuecd on a usb flash drive. 

http://www.sysresccd.org/Sysresccd-manual-en_How_to_install_SystemRescueCd_on_an_USB-stick

----------

## Hu

If I had to guess, I would say trying to fake out the missing physical volume might work, but that I would try that only as a last resort.  As an alternative, if you knew exactly where the relevant filesystems were on the volume group, I think you could use the device mapper to create block devices that are backed by those areas, allowing you to mount the filesystems directly.  I have never tried this.

PXE booting is supported by most medium to high end NICs, and is an ideal way of recovering most systems since it does not require spare hardware in the target system.  It does require having a second system to serve the PXE files and recovery user tools.  However, if you have never done it before and plan to move within a few days, I doubt you will have time to learn it, create a working environment, and recover your data, before you need to box up and move.  You might be able to use http://boot.kernel.org in lieu of a local second system, but I have not experimented with it.

I would expect a LiveCD image could be placed within the space provided by sacrificing a 1.5GB swap partition.  There may be secondary problems if the recovery distribution does not expect to be booted from a hard drive.  The easiest way to know is to try it, and I do not have any machines that I can take down to test that for you.

Swapping out the SATA controller may help, but without understanding more about why the current controller fails when a CD drive is used, I cannot say.

For temporary access to some data, you might be able to get at it by searching the raw block device for known strings.  For example, if you remember the name, phone number, or other reasonably unique data associated with a contact, you could search the block device for that.  If you are lucky, other data you need and do not remember is physically nearby.

----------

## tuber

Be warned that I haven't tried this so I don't know if it causes permanent changes, but it sounds like you might be able use the "--partial" argument to many of the lvm commands. Again, I've never tried this so I don't know if it permanently changes your setup or not.

----------

## Beetle B.

Just thought I'd reply in case any other hapless person looks at this.

I did it with Sysreccd. It's awesome. You don't even need to create a separate partition to boot into it. So I no longer need to boot from a CD or disconnect a HD, and now have access to all my data. I  fixed some, but not all my problems via chrooting into my Gentoo system. Still can't boot directly into Gentoo. I'll open a separate topic to address that.

Thanks. (Only did this recently as I had moved and it took a long time to ship the computer).

----------

