Re: An odd one...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Mikkel L. Ellertson skrev:
Frode Petersen wrote:
1)
I didn't change the kernel or the (memory?) image file, and I suspect
that might be one reason. Are there hardcoded references to partitions
in these files, so that the reference in grub.conf is used only to find
the kernel, and not tell the kernel where to find and mount the other
partitions? Has the kernel an 'image' of the disk system on which it is
compiled?

The /boot/initrd-<version>.img file has information on the LVG
configuration, so if that is changing, you need to build a new
initrd file. man mkinitrd for more information.

Is that info related to names of partitions only, or to location on the disk also? I suspect the first, which would mean that I could use the tool you mention further down to move things around, ending up with an identical partitioning scheme even if I 'slide' the partitions over a bit on the physical disk. Or am I wrong?

2)
The /dev/root special file (as all other special files in /dev were not
copied over. I tried, but gave up. The command I used was

    cp -P --copy-contents /dev/root .
but after some minutes, the copy had grown to several GB, so I aborted
and deleted the file. The copying probably got caught in some circular
recursiveness.
I know the special files are neccesary, but are they generated on the
fly by the kernel, or do I have to do it manually? And would the lack of
them in it self cause the kernel panic?

The contents of the /dev directory are created on the fly once udev
is started. If you look at /proc/mounts, you will see an entry:
/dev /dev tmpfs rw 0 0
You do not see it when running mount, probably because it was
mounted before /etc was read/write. But there are a few entries that
are in the /dev directory that are needed before the dev file system
is mounted. The best way I have found to copy them is to boot from a
live CD, mount the file systems, and copy that way.

You also do NOT want to use the --copy-contents option when trying
to copy device entries. You were trying to copy the contents of the
drive partitions, and not the device entry. On top of that, the
"contents" of some device entries appear to be infinite. (/dev/zero
and /dev/random for example.)

I saw a warning about those devices, but thought that /dev/root was different. Why, I don't know. Lesson learned, I guess..

As a side note, you can use cp to copy a disk partition, but it is
not usually a good idea. This is especially true for a partition
mounted r/w. (I prefer using dd over cp when doing that type of
copy. Things like "dd if=/dev/fd0 of=floppy.img" can be handy.)

Is it safe to have both if and of point to a partition, or should I go with the intermediate image file?

3)
I have to add more entries to the grub.conf entry.

4)
Something I haven't thought of at all.

I'll probably just reinstall FC6 from scratch, but if someone comes up
with an idea on how to proceed, I'll try it out first. I just consider
this as a learning opportunity.

If you want the learning experence, get the System Rescue CD. It can
handle LVM, but unless you copy /etc/lvm/lvm.conf to something like
a USB drive or floppy, you will have to use the lvm tools to
generate the information.

Thanks for the warning and the tip. I have fetched it and will try it out.


http://www.sysresccd.org/

Mikkel

Thank you for the help with this. I had thought it was a lost cause, but I'll see what is to be learned from all this.

Frode


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux