Received: from list by lists.gnu.org with archive (Exim 4.71) id 1TApKY-0000sS-Ca for mharc-grub-devel@gnu.org; Sun, 09 Sep 2012 17:46:14 -0400 Received: from eggs.gnu.org ([208.118.235.92]:53000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAjMV-0003Ya-NS for grub-devel@gnu.org; Sun, 09 Sep 2012 11:23:53 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1TAjMU-0005CF-AI for grub-devel@gnu.org; Sun, 09 Sep 2012 11:23:51 -0400 Received: from col0-omc2-s11.col0.hotmail.com ([65.55.34.85]:61070) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1TAjMU-0005AP-1W for grub-devel@gnu.org; Sun, 09 Sep 2012 11:23:50 -0400 Received: from COL111-W59 ([65.55.34.73]) by col0-omc2-s11.col0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675); Sun, 9 Sep 2012 08:23:49 -0700 Message-ID: Content-Type: multipart/alternative; boundary="_ac979169-d96a-4e3f-86c9-d8ccb06886d0_" X-Originating-IP: [96.242.240.15] From: Survey Response To: , Subject: RE: RE : Full Disk Encryption (including Date: Sun, 9 Sep 2012 08:23:48 -0700 Importance: Normal In-Reply-To: <5hafxin601eeac13md39jisn.1347194040233@email.android.com> References: <5hafxin601eeac13md39jisn.1347194040233@email.android.com> MIME-Version: 1.0 X-OriginalArrivalTime: 09 Sep 2012 15:23:49.0126 (UTC) FILETIME=[1C69EA60:01CD8E9F] X-detected-operating-system: by eggs.gnu.org: Windows 2000 SP4, XP SP1+ X-Received-From: 65.55.34.85 X-Mailman-Approved-At: Sun, 09 Sep 2012 17:46:12 -0400 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Sep 2012 15:23:53 -0000 --_ac979169-d96a-4e3f-86c9-d8ccb06886d0_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi Arbiel=2C The isofile is set with the leading "/" . The problem appears to be caused = by the fact that the system devices are not created at the time the kernel = is loaded. The LUKS partition appears to be decrypted=2C since I can list t= he ISO folder under (crypt0)=2C but there is no equivalent device under /de= v that I can pass to the linux command. Thanks=2CSteve Date: Sun=2C 9 Sep 2012 14:38:12 +0200 Subject: RE : Full Disk Encryption (including From: arbiel.perlacremaz@laposte.net To: survey.response@live.com=3B grub-devel@gnu.org Hi Did'nt you forget a "/" between the disk's UUID and the variable holding th= e file name in the linux command ? Arbiel Envoy=E9 depuis Samsung Galaxy Note=20 Survey Response a =E9crit : Hi=2C On my USB drive=2C I have encrypted the entire disk as a single LUKS encryp= ted partition. I have the grub files on this partition with an ISO image fo= r a Debian-live based distribution. I compiled Grub 2.00 with the necessary= crypto modules and left a larger embedding zone before the first LUKS part= ition to accommodate the larger second-stage bootloader (my core.img is abo= ut 44K). When I boot off this USB drive=2C GRUB asks me the password initia= lly for the encrypted drive and then gets to the point where it brings up t= he menu=2C but I couldn't get it to load the kernel since I need to pass th= e kernel the system device for the ISO image (the live-media and fromiso bo= ot parameters below) and I notice that the devices are not available at the= time of loading the kernel (or later=2C for that matter). Can somebody hel= p me figure out what I am doing wrong? Would be much obliged=2C since I hav= e been spending some time trying to figure this out. Here is my grub.cfg menuentry 'FDE Live' { set isofile=3D"/ISOs/linux.iso" # The UUID for the encrypted LUKS partition as obtained by running = blkid set encryptedfs_uuid=3D"377da6816e9a4c7092ae9016a719d04d"=20 # The UUID for the decrypted ext4 fs in the LUKS partition s= et decryptedfs_uuid=3D"a8604976-269b-4ab1-8ecc-63960f60f008" insmod part_msdos insmod loopback insmod iso9660 = insmod cryptodisk insmod luks echo 'Mounting encrypted disk ...' cryptomount -u ${encrypt= edfs_uuid} echo 'Searching for the root fs in the decrypted fs...' set = root=3D(cryptouuid/${encryptedfs_uuid}) search --no-floppy --fs-uuid= --set=3Droot ${decryptedfs_uuid} echo 'Setting up a loopback device to the CD image' loopback= loop $root/$isofile set root=3Dloop echo 'Loading Linux Kernel ...' linux /live/vmlinuz boot=3D= live live-media=3D/dev/disk/by-uuid/${decryptedfs_uuid} fromiso=3D/dev/disk= /by-uuid/${decryptedfs_uuid}$isofile initrd=3D/live/initrd.img config debug= video=3D640x480 fbcon=3Dscrollback:128 echo 'Loading initial ramdisk ...' initrd /live/initrd.img} From the debugging output on the console=2C I see that /dev/disk/by-uuid/a8= 604976-269b-4ab1-8ecc-63960f60f008 (the decryptedfs_uuid) does not exist at= the time the linux kernel is being loaded. I can access this folder from t= he grub command line using the Grub drive (cyrptuuid/377da6816e9a4c7092ae90= 16a719d04d)/ISOs/linux.iso=2C but I need to be able to reference this in a = way the linux kernel would understand. Once again=2C thanks for any help. Pardon any newbie mistakes I may be maki= ng. It's a learning experience for me and I am hoping this would be a good = exercise in understanding how it all works. Thanks=2CSteve = --_ac979169-d96a-4e3f-86c9-d8ccb06886d0_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable
Hi Arbiel=2C

The isofile is set with the leading "= /" . The problem appears to be caused by the fact that the system devices a= re not created at the time the kernel is loaded. The LUKS partition appears= to be decrypted=2C since I can list the ISO folder under (crypt0)=2C but t= here is no equivalent device under /dev that I can pass to the linux comman= d.

Thanks=2C
Steve



Date: Sun=2C 9 Se= p 2012 14:38:12 +0200
Subject: RE : Full Disk Encryption (including
F= rom: arbiel.perlacremaz@laposte.net
To: survey.response@live.com=3B grub= -devel@gnu.org

Hi

Did'nt you forget a = "/" between the disk's UUID and the variable holding the file name in the l= inux command ?

Arbiel



Envoy=E9 depuis Samsung Galaxy Note

Survey Resp= onse <=3Bsurvey.response@live.com>=3B a =E9crit :
Hi=2C

On my USB drive=2C I have encrypted the entire dis= k as a single LUKS encrypted partition. I have the grub files on this parti= tion with an ISO image for a Debian-live based distribution. I compiled Gru= b 2.00 with the necessary crypto modules and left a larger embedding zone b= efore the first LUKS partition to =3Baccommodate =3Bthe larger seco= nd-stage bootloader (my core.img is about 44K). When I boot off this USB dr= ive=2C GRUB asks me the password initially for the encrypted drive and then= gets to the point where it brings up the menu=2C but I couldn't get it to = load the kernel since I need to pass the kernel the system device for the I= SO image (the live-media and fromiso boot parameters below) and I notice th= at the devices are not available at the time of loading the kernel (or late= r=2C for that matter). Can somebody help me figure out what I am doing wron= g? Would be much obliged=2C since I have been spending some time trying to = figure this out.

Here is my grub.cfg
menuentry 'FDE Live' {
 =3B  =3B  =3B  =3B =3B
 =3B=  =3B  =3B  =3B set isofile=3D"/ISOs/linux.iso"

<= /div>
 =3B  =3B  =3B  =3B # The UUID for the encrypted = LUKS partition as obtained by running blkid
 =3B  =3B &nb= sp=3B  =3B set encryptedfs_uuid=3D"377da6816e9a4c7092ae9016a719d04d"&nb= sp=3B

 =3B  =3B  =3B  =3B # The UU= ID for the decrypted ext4 fs in the LUKS partition
 =3B  = =3B  =3B  =3B set decryptedfs_uuid=3D"a8604976-269b-4ab1-8ecc-63960= f60f008"

 =3B  =3B  =3B  =3B insmo= d part_msdos
 =3B  =3B  =3B  =3B insmod loopback<= /div>
 =3B  =3B  =3B  =3B insmod iso9660
&nbs= p=3B  =3B  =3B  =3B insmod cryptodisk
 =3B  = =3B  =3B  =3B insmod luks

 =3B  = =3B  =3B  =3B echo 'Mounting encrypted disk ...' =3B
=  =3B  =3B  =3B  =3B cryptomount -u ${encryptedfs_uuid}

 =3B  =3B  =3B  =3B echo 'Searching fo= r the root fs in the decrypted fs...'
 =3B  =3B  =3B =  =3B set root=3D(cryptouuid/${encryptedfs_uuid})
 =3B &nb= sp=3B  =3B  =3B search --no-floppy --fs-uuid --set=3Droot ${decrypt= edfs_uuid}

 =3B  =3B  =3B  =3B ech= o 'Setting up a loopback device to the CD image'
 =3B  =3B  =3B  =3B loopback loop $ro= ot/$isofile
 =3B  =3B  =3B  =3B set root=3Dloop

 =3B  =3B  =3B  =3B echo= 'Loading Linux Kernel ...'
 =3B  =3B  =3B  =3B l= inux  =3B/live/vmlinuz boot=3Dlive live-media=3D/dev/disk/by-uuid/${dec= ryptedfs_uuid} fromiso=3D/dev/disk/by-uuid/${decryptedfs_uuid}$isofile init= rd=3D/live/initrd.img config debug video=3D640x480 fbcon=3Dscrollback:128

 =3B  =3B  =3B  =3B echo 'Loading i= nitial ramdisk ...'
 =3B  =3B  =3B  =3B initrd /l= ive/initrd.img
}

From the debuggin= g output on the console=2C I see that /dev/disk/by-uuid/a8604976-269b-4ab1-8ecc-63960f60f008 (the decryptedfs_uuid) doe= s not exist at the time the linux kernel is being loaded. I can access this= folder from the grub command line using the Grub drive (cyrptuuid/<= span style=3D"font-size:10pt">377da6816e9a4c7092ae9016a719d04d)/ISOs/linux.= iso=2C but I need to be able to reference this in a way the linux kernel wo= uld understand.

=
Once again=2C thanks for any help. Pardon any newbie mistakes I = may be making. It's a learning experience for me and I am hoping this would= be a good exercise in understanding how it all works.

=
Thanks=2C
Steve
=
= --_ac979169-d96a-4e3f-86c9-d8ccb06886d0_--