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

Re: Upgrading from Lenny to Squeeze



On Sun, 27 Nov 2011 16:38:20 -0500 (EST), Marc Shapiro wrote:
> 
> I reran lilo and rebooted, but the problems remained.  I found that by 
> changing the last column in /etc/fstab from '2' to '0' on the removable 
> flash drives eliminated those errors.

I hadn't noticed that, but yes, the "pass" option in /etc/fstab for
my mountable devices is set to zero too.

> That only leaves one boot problem.  That would be the problem of not
> being able to stat the swap 
> partition, but the swap being active once the boot was finished.  I 
> copied down the message so there would be more information:
> 
> Begin: Running /scripts/local-premount ... resume: libgcrypt version 1.4.5
> resume: Could not stat the resume device file '/dev/mapper/vg1-swap'
>          Please type in the full path name to try again
>          or press ENTER to boot the system

Aha!  A light goes on.  It's a SUSPEND/RESUME issue.  In the general case,
there can be multiple swap partitions specified in /etc/fstab.  One of
them is chosen as the SUSPEND/RESUME device.  That is specified in
/etc/initramfs-tools/conf.d/resume.  During a SUSPEND, the contents of
memory are written to the device specified in
/etc/initramfs-tools/conf.d/resume.  (And a copy of
/etc/initramfs-tools/conf.d/resume is placed in the 
initial RAM file system, too; so if you change it, you must
rebuild your initial RAM file system.)  Early in the boot, with the initial
RAM file system still active as the root file system, it tests to see
if there is a valid SUSPEND image on the SUSPEND/RESUME device.  If there is,
it attempts a RESUME.

Since your permanent root file system is not a logical volume, chances are
there is no LVM stuff in your initial RAM file system.  Therefore, it is
trying to access the SUSPEND/RESUME device before it is available.
I don't recommend using a logical volume as a swap device anyway.
It adds too much overhead.  The swap device should be the highest performance
device you have, in most cases.  I recommend that you change your swap file
to a regular disk partition in /etc/fstab.  Also make sure that the "pass"
variable for the swap device is set to zero, as you did for the mountable
devices.  Also change the specification of the SUSPEND/RESUME device in
/etc/initramfs-tools/conf.d/resume.  Then run

   update-initramfs -uk $(uname -r)

(which should also re-run lilo.  If it doesn't, you've got problems.)
Another thing: if you are using lilo with a custom kernel, one produced
with make-kpkg or "make deb-pkg", you will need to install some hook
scripts to maintain symbolic links.  See my kernel-building web page,

   http://users.wowway.com/~zlinuxman/Kernel.htm

for the two "zy-symlinks" hook scripts which you can install to do this.
(Look under the section "Customizing the Kernel Installation Environment",
sub-section "Customizing the Squeeze Environment").  If you are using
a stock Debian kernel, then you don't necessarily need these hook scripts,
but if you don't use them it is important to have

   do_symlinks = yes

specified in /etc/kernel-img.conf.  Your /etc/lilo.conf file makes use of
symbolic links; so it is important that they be maintained.

-- 
  .''`.     Stephen Powell    
 : :'  :
 `. `'`
   `-


Reply to: