On Sunday 20 December 2015 13:18:09 Stephen Powell wrote:
> On Sun, 20 Dec 2015 05:58:47 -0500 (EST), David Baron wrote:
> > OK, mounted newrootpartition newroot
> > Did a cp -x /  newroot
> > Successful so far, elementary
> > 
> > Edited newroot/etc/fstab and newroot/etc/lilo.conf to point root to
> > newrootpartition (by uuid)
> > 
> > mount --bind /dev newroot/dev
> > mount --bind /proc newroot/proc
> > as instructed in various posts, to enable lilo to run.
> > 
> > chroot newroot
> > lilo ...
> > 
> > Looked successful. Umounted everything and reboot.
> > 
> > Get boot menu (congratulations !?).
> > Chose the kernel.
> > 
> > Now got that lvm not ready business.. I usually get this once and then
> > normally boot up. Now getting it over and again. BTW, if I control/C a few
> > times, I end up inside initramfs>.
> > 
> > Put up the live DVD, regenerated the initramfs, but ... no change.
> > Put up the live DVD, mounted the old root partition,  went through the
> > lilo
> > process and back up.
> > 
> > So ... how do I do this??
> 
> I have several thoughts.
> 
> First of all, the right way to copy the root filesystem under these
> conditions is
> 
>    cp -a -x /. newroot
> 
> That period after the forward slash is important!
> 
> Second, make sure that the initial RAM filesystem contains everything needed
> to initialize a logical volume.  If you make a logical volume the root
> filesystem in the Debian installer, the Debian installer *should* do
> whatever is necessary to make sure that everything needed to mount a
> logical volume gets included in the initial RAM filesystem.  I've never
> tried to do this, so I can't give you a list of what files will be needed. 
> You can examine an existing inital RAM filesystem to see what files are
> included by using lsinitramfs.
> 
> Third, although it is possible to make a logical volume the root filesystem,
> /boot must not be part of this filesystem.  It must be a separate partition
> on a physical volume.  (Furthermore, it must be a separate partition that
> is accessible via the BIOS.)  The same goes for the boot sector.  (The
> "boot" configuration record in /etc/lilo.conf.)  Usually, this is the first
> sector on the /boot partition or else the master boot record.  And if it is
> not the master boot record, then a generic MBR boot loader program must be
> installed in the MBR and the /boot partition must be on that physical disk,
> and it must be marked active in the partition table (and all other
> partitions marked inactive). Finally, make sure that the BIOS is actually
> booting from this physical disk.
> 
> Although the specific subject of using an LVM2 logical volume as the root
> filesystem is not specifically covered, you may find some useful lilo
> tidbits on my lilo web page:
> 
>    http://www.stevesdebianstuff.org/lilo.htm
> 
> Finally, make sure that there are no duplicate UUIDs in the system that
> might confuse the kernel during boot.

Thanks for the detailed explanation!

I am not now using logical volumes. (When I did in the past, boot was indeed 
separate.) Do not need the layer of complication and unless one is careful to 
leave unallocated areas, the whole thing becomes locked up anyway.
 
I did not know about the /. so will definitely try it this way.

The first time I did this, moving from the tiny partition to the old IDE 
partition, I did not do any of this. I did the copy, edited the files in situ 
(old root), ran lilo and it booted up. But ... the old root was still active 
because the newroot files were not the edited copies (i.e., old fstab). So 
once I fixed that, it simply played, no fuss, no muss.

So ... do I need the chroot and the binds and all this at all?

Reply via email to