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

Re: Swap partition isn't activated



El lun, 10-01-2011 a las 10:27 +0100, Daniel Baumann escribió:
> swap handling happens during 12fstab
> 
> On 01/10/2011 09:30 AM, Carlos Alarcon wrote:
> >          + /scripts/live-bottom/12fstab
> >          Begin: Configuring fstab ... done.
> 
> since that doesn't show anything, you'll need to rebuild the initrd with 
> a set -x in 12fstab.


Ok, from the logs and some lines I had added to 12fstab I can see that
there is not /dev/sd[a-z] devices when 12fstab runs:

        + /scripts/live-bottom/12fstab
        + PREREQ=
        + FSTAB=/root/etc/fstab
        + . /scripts/live-functions
        + . /scripts/functions
        + . /live.vars
        + [ -n  ]
        + log_begin_msg Configuring fstab
        + [ -x /sbin/usplash_write ]
        + _log_msg Begin: Configuring fstab ...
        + [ n = y ]
        + printf Begin: Configuring fstab ...
        Begin: Configuring fstab ... + [ ! -f /root/etc/fstab ]
        + grep -qs UNCONFIGURED FSTAB FOR BASE SYSTEM /root/etc/fstab
        + cat
        + grep -qs ^aufs /root/etc/fstab
        + echo aufs / aufs rw 0 0
        + grep -qs ^tmpfs /tmp /root/etc/fstab
        + echo tmpfs /tmp tmpfs nosuid,nodev 0 0
        + [ -n Yes ]
        + devices=
        + ls -lrtha /dev/sd*
        ls: /dev/sd*: No such file or directory
        + blkid
        /dev/loop0: TYPE="squashfs"
        + [ -b /dev/[hs]d[a-z][0-9]* ]
        + continue
        + grep -qs swap swap /root/etc/fstab
        + [  != Yes ]
        + touch root/fastboot
        
So 12fstab don't even try to mount any swap partition.

> 
> > I am afraid that live-boot cannot activate it on boot time because
> > it is on a USB disk and maybe sd_mod is not activated at the time the
> > machines swap is tried to be activated.
> 
> that looks like the reason for it.
> 
> for live-boot 3.x, i think about moving swap partition handling to 
> live-config which would solve the problem too.
> 
> if you depend on having the swap partition on usb with 2.x, i suggest 
> you just locally include the required modules and initialize the device 
> in live-premount.

I had tried that (Probably I am doing it wrong, but I thought it was
just a matter of including modprobe lines in
the /usr/share/initramfs-tools/scripts/live-premount/modules file, so I
added:
        modprobe scsi_mod
        modprobe crc-t10dif
        modprobe sd_mod
        lsmod 

at the very end (also put set -x at the beginning) but it seems that
they are not loaded:

        + /scripts/live-premount/modules
        + PREREQ=udev
        + modprobe -q ide-generic
        + modprobe -q esp
        + modprobe scsi_mod
        + modprobe crc-t10dif
        + modprobe sd_mod
        + lsmod
        /scripts/live-premount/modules: line 1: lsmod: not found
        

(well seems that lsmod command is not ready at that moment, but as far
as the /dev/sda* partitions aren't created seems that the modules
weren't loaded)

¿What is the way to load modules into kernel in the live-premount?

Regards

-- 
Carlos Alarcón.

Tel: 916249029 ext: 2002


Reply to: