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

upgrading kernel in encrypted system



I installed Etch on a new Sony Vaio TXN-27N, using the default
encrypted root option.  Very easy, and it works great - my
congratulations to the Debian installation team!

A 2.6.18 kernel was installed.  I would like to upgrade that to
2.6.21, to take advantage of some new Sony-specific features.
I started with official 2.6.18 sources, did "make oldconfig" starting
from the configuration of the installed kernel, built the kernel,
modules, and a new initramfs.  That all works.

However, when I patch the kernel sources up to 2.6.19, the resulting
kernel cannot find the root filesystem.  Details are below.  The big
difference I see is that a successful kernel recognizes the disk as
/dev/hda, while the unsuccessful kernel recognizes it as the SCSI
device /dev/sda.  I'd really like to know why.

I see very little difference between the two initramfs's.  In
particular, they have the same ten modules *scsi*.ko, and the same
twelve modules *sata*.ko.  There's no ide-scsi module anywhere.
I see the 2.6.18 initramfs has a file module-list, which the other one
lacks.  Where does this come from?  Does it matter?

I'd appreciate any suggestions.

          - Jim Van Zandt <jrvz@comcast.net>

details:

script used to make an initramfs (installed as /root/bin/installkernel):
   http://jrv.oddones.org/tx27/installkernel


  --- working 2.6.18 kernel ---
configuration:
   http://jrv.oddones.org/tx27/config-2.6.18
listing of initramfs contents:
   http://jrv.oddones.org/tx27/initramfs-contents-2.6.18
The whole initramfs:
   http://jrv.oddones.org/tx27/initrd.img-2.6.18
Boot messages:
   http://jrv.oddones.org/tx27/dmesg-2.6.18-okay

  --- failing 2.6.19 kernel ---
configuration:
   http://jrv.oddones.org/tx27/config-2.6.19
listing of initramfs contents:
   http://jrv.oddones.org/tx27/initramfs-contents-2.6.19
the whole initramfs:
   http://jrv.oddones.org/tx27/initrd.img-2.6.19
Boot messages (manually transcribed, just the messages involving the disks)
   http://jrv.oddones.org/tx27/dmesg-2.6.19-selected-failed



2.6.19 failure, Boot messages relating to disks (manually transcribed):
--------------------------------
SCSI subsystem initialized
ata1: PATA max UDMA/133 cmd 0x1F0 ctl 0x3F6 bmdma 0x1810 irq 14
ata2: PATA max UDMA/133 cmd 0x170 ctl 0x376 bmdma 0x1818 irq 15
scsi0 : ata_piix
ata1.00: ATA-7, max UDMA/1800, 195371568 sectors: LBA48
ata1.00: ata1: dev 0 multi count 16
ata1.01: ATAPI, max UDMA/33
ata1.00: configured for UDMA/100
ata1.01: configured for UDMA/33
scsi0 : ata_piix
ata2: port disabled. ignoring.
ATA: abnormal status 0xFF on port 0x177
scsi 0:0:0:0: Direct-Access    ATA      TOSHIBA MK1011GA BK00 PQ: 0 ANSI: 5
scsi 0:0:1:0: CD-ROM           MATSHITA DVD-RAM UJ-852S  1.30 PQ: 0 ANSI: 5
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
SCSI device sda: 195371568 512-byte hdwr sectors (100030 MB)
sda: Write Protect is off
SCSI device sda: drive cache: write back
 sda: sda1 sda2 < sda5 >
sd 0:0:0:0: Attached scsi generic sg0 type 0
sr 0:0:1:0: Attached scsi generic sg1 type 5
usb 3-1: new full speed USB device using uhci_hcd and address 3
Done.
Begin: Mounting root file system... ...
Begin: Running /scripts/local-top ...
usb 3-1: configuration #1 chosen from 1 choice
  Volume group "ista" not found
  Volume group "ista" not found
ide0: I/O resource 0x1F0-0x1F7 not free.
ide1: ports already in use, skipping probe
Setting up cryptographic volume hda5_crypt (bvased on /dev/hdat)
cryptsetup: Source device /dev/hda5 not found
Setting up cryptographic volume hda5_crypt (based on /dev/had5)
cryptsetup: Source device /dev/hda5 not found
Done.
Begin: Waiting for root file system... ...
Done.
ALERT!  /dev/mapper/ista-root does not exist.  Dropping to a shell!
        Check your root= boot arbument (cat /proc/cmdline)
--------------------------------

Under busybox in initramfs:

(initramfs) cat /proc/cmdline
root=/dev/mapper/ista-root ro

(initramfs) ls /dev/mapper
control

(initramfs) cat /proc/modules
ide-generic 1344 0 [permanent], Live 0xf8834000
sg 32284 0 - Live 0xf8915000
sr_mod 16036 0 - Live 0xf890c000
cdrom 33024 1 sr_mod, Live 0xf894c000
sd_mod 19600 0 - Live 0xf893b000
generic 5380 0 [permanent], Live 0xf88a2000
piix 9348 0 [permanent], Live 0xf89111000
ide_core 112680 3 ide_generic,generic,piix, Live 0xf891e000
ehci_hcd 28296 0 - Live 0xf88f8000
ohci1394 31952 0 - Live 0xf88ef000
ata_piix 15400 0 - Live 0xf88b0000
e100 32200 0 - Live 0xf88a5000
mii 5280 1 e100, Live 0xf8897000
ieee1394 87192 1 ohci1394, Live 0xf8855000
libata 95956 1 ata_piix, Live 0xf88d6000
scsi_mod 128332 4 sg,sr_mod,sd_mod,libata, Live 0xf88b5000
uhci_hcd 21516 0 - Live 0xf884e000
usbcore 123172 3 ehci_hcd,uhci_hcd, Live 0xf886c000
thermal 13704 0 - Live 0xf8838000
processor 30152 1 thermal, Live 0xf883d000
fan 4688 0 - Live 0xf882f000




Successful boot with 2.6.18 kernel, messages relating to disks:
--------------------------------
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
    ide0: BM-DMA at 0x1810-0x1817, BIOS settings: hda:DMA, hdb:DMA
hda: TOSHIBA MK1011GAH, ATA DISK drive
hdb: MATSHITADVD-RAM UJ-852S, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
hda: max request size: 512KiB
hda: 195371568 sectors (100030MB), CHS=16383/255/63, UDMA(100)
hda: cache flushes supported
 hda: hda1 hda2 < hda5 >
hdb: ATAPI 24X DVD-ROM DVD-R-RAM CD-R/RW drive, 2048kB Cache, UDMA(33)
Uniform CD-ROM driver Revision: 3.20
Done.
Begin: Mounting root filesystem... ...
Begin: Running /scripts/local-top ...
device-mapper: ioctl: 4.7.0-ipctl(2006-06-24) initialized: dm-devel@redhat.com
  Volume group "ista" not found
  Volume group "ista" not found
Setting up cryptographic volume hda5_crypt (based on /dev/hdat)
Enter LUKS passphrase:
--------------------------------

after booting:

$ cat /proc/cmdline
root=/dev/mapper/ista-root ro

$ ls /dev/mapper
control  hda5_crypt  ista-root  ista-swap_1

$ cat crypttab
hda5_crypt /dev/hda5 none luks


After manually unpacking either initramfs, I find:
$ cat conf/conf.d/cryptroot
target=hda5_crypt,source=/dev/hda5,key=none,lvm=ista-root
target=hda5_crypt,source=/dev/hda5,key=none,lvm=ista-swap_1



Reply to: