LMDE 201303 or 201403 with luks encrypted lvm2 partitions

Questions about Grub, the liveCD and the installer
Forum rules
Before you post please read this

LMDE 201303 or 201403 with luks encrypted lvm2 partitions

Postby Pepas on Mon Apr 22, 2013 6:39 pm

Great release! I have installed this on my harddrive now, zero problems. But since i require full encryption, I made this makefile to install on luks encrypted lvm2 partitions, so you get your swap and data partitions encrypted too: http://j.mp/makelmde
I don't want to spam the forums (I also posted in "Howto install LMDE with LVM (with or without encryption"), but I think this would be very helpful for those that want full encryption.

Instructions:

1. Boot the Live environment of LMDE 201303 or 201403

2. Open a Terminal (Menu, Terminal) and enter:
Code: Select all
sudo -i
wget j.mp/makelmde
mv makelmde Makefile

3. If needed, adapt the SETTINGS section in the Makefile:
Code: Select all
nano Makefile

4. Partition the drive, for instance (taking up all space):
Code: Select all
fdisk /dev/sda
o [Enter]
n [Enter]
   [Enter]
   [Enter]
   [Enter]
+128M [Enter]
n [Enter]
   [Enter]
   [Enter]
   [Enter]
   [Enter]
w [Enter]

(This is making a 128 MB boot partition, and giving the rest to the encrypted lvm2)

5. Start the Makefile by doing:
Code: Select all
make all

6. Answer the questions as they come up:
- password for encryption (twice the same)
- password for decryption (same again)
Then after a wait for all the preparations to have happened:
- password for user, and some irrelevant info
- about the keyboard
- about the timezone

And that's it!
Last edited by Pepas on Tue Mar 04, 2014 4:23 pm, edited 4 times in total.
User avatar
Pepas
Level 1
Level 1
 
Posts: 35
Joined: Mon Jan 24, 2011 10:18 am

Linux Mint is funded by ads and donations.
 

LMDE 201303 -32bit installation failed

Postby AlCantara on Sun Apr 28, 2013 7:18 pm

Installation of LMDE 201303 -32bit fails shortly after the status-line announced that some files have been copied and the keyboard (german layout) was configured. Some other message is displayed and the installer disappears.
Tried it multiple times.

Is there a way to get more information why the installation fails? Some kind of log?

System: Athlon XP single Core, SIS Chipset, 2gb Ram, Radeon 9200, 300gb sata harddisk, PS/2 keyboard.
(PS Live-system does not boot with a realtek rtl8185 pci card.)

Al
AlCantara
Level 1
Level 1
 
Posts: 10
Joined: Sun Feb 18, 2007 2:34 pm

Re: LMDE 201303 -32bit installation failed

Postby Acid_1 on Sun Apr 28, 2013 7:31 pm

AlCantara wrote:Installation of LMDE 201303 -32bit fails shortly after the status-line announced that some files have been copied and the keyboard (german layout) was configured. Some other message is displayed and the installer disappears.
Tried it multiple times.

Is there a way to get more information why the installation fails? Some kind of log?

System: Athlon XP single Core, SIS Chipset, 2gb Ram, Radeon 9200, 300gb sata harddisk, PS/2 keyboard.
(PS Live-system does not boot with a realtek rtl8185 pci card.)

Al


Did you check the MD5 sums of the iso after you downloaded it?
Website: Forkwhilefork
User avatar
Acid_1
Level 5
Level 5
 
Posts: 817
Joined: Thu Nov 01, 2007 11:12 pm
Location: Saskatchewan, Canada

Re: LMDE 201303 -32bit installation failed

Postby AlCantara on Sun Apr 28, 2013 7:58 pm

Acid_1 wrote:Did you check the MD5 sums of the iso after you downloaded it?


Did a 'Integrity check' self-test of the installation disc and ran a memory-test, which both succeeded.

Did serveral installations in german language.
Erased the harddisc completly, installed on default- and a custom partitions. (always ext4)
Just tried another english setup and with english keyboard-layout.
This time it disappears while copying files. (progress-bar 40%)
AlCantara
Level 1
Level 1
 
Posts: 10
Joined: Sun Feb 18, 2007 2:34 pm

Re: LMDE 201303 -32bit installation failed

Postby Pepas on Mon Apr 29, 2013 1:40 pm

You could always try the Makefile approach (see above). If you really don't want full encryption or lvm2 you can edit the Makefile to suit yourself. The advantage is that you can see exactly what is happening, and where things fail (if they do 8) ).
User avatar
Pepas
Level 1
Level 1
 
Posts: 35
Joined: Mon Jan 24, 2011 10:18 am

makefile error

Postby AlCantara on Mon Apr 29, 2013 3:47 pm

Thank you, Pepas.

I get an error on line 291:
cp -a /live/rofs/filesystem.squashfs/* /target
cp: cannot stat 'live'rofs/filesystem.squashfs/*': no such file or directory
make: *** [_copy] Error 1

I have no real idea whats going on there.


makefile did several downloads

pvscan No matching physical volues found

vgchange -ay No volume groups found

lvscan No volume groups found

After that it does several partion- and filesystem-magic that succeeds, shows df-status and does touch _mount.

Than the error above occurs:
cp -a /live/rofs/filesystem.squashfs/* /target
cp: cannot stat 'live'rofs/filesystem.squashfs/*': no such file or directory
make: *** [_copy] Error 1

Where can I access /live/rofs/... to check whats going on there?
Is there a command missing?
AlCantara
Level 1
Level 1
 
Posts: 10
Joined: Sun Feb 18, 2007 2:34 pm

Re: LMDE 201303 released!

Postby AlCantara on Mon Apr 29, 2013 4:31 pm

Hi. I did another installation attempt:

created partitions:
128mb ext2 /boot
ext 16gb swap
ext 260gb ext3 /

waited until all files where copied.
did the required inputs. (all default english)
about 10 seconds after the installer starts 'installation', it disappears.

I thought that RAM may be insufficient, but there was always about 100mb free.

What else should I try?
AlCantara
Level 1
Level 1
 
Posts: 10
Joined: Sun Feb 18, 2007 2:34 pm

Re: LMDE 201303 released!

Postby Pepas on Mon Apr 29, 2013 5:01 pm

Not sure what is happening. On /live/rofs/filesystem.squashfs/ is where the squashed filesystem should be mounted. The live environment uses that too. You could check the contents with:
Code: Select all
ls /live/rofs/filesystem.squashfs


But if the Makefile indicates it can't find anything there, it's probably empty. You can unpack the squashfs manually by doing:
Code: Select all
unsquashfs -f -d /target /live/image/casper/filesystem.squashfs


Then you can continue the Makefile by doing:
Code: Select all
touch _copy   ## (because this you did manually)
make all  ## (it will continue with the steps that haven't been done yet)
User avatar
Pepas
Level 1
Level 1
 
Posts: 35
Joined: Mon Jan 24, 2011 10:18 am

Re: LMDE 201303 released!

Postby AlCantara on Mon Apr 29, 2013 6:08 pm

Pepas wrote:Not sure what is happening. On /live/rofs/filesystem.squashfs/ is where the squashed filesystem should be mounted. The live environment uses that too. You could check the contents with:
Code: Select all
ls /live/rofs/filesystem.squashfs


there is no /live folder in the root. :(

Pepas wrote:But if the Makefile indicates it can't find anything there, it's probably empty. You can unpack the squashfs manually by doing:
Code: Select all
unsquashfs -f -d /target /live/image/casper/filesystem.squashfs



squashfs-tools aren´t installed.
Code: Select all
apt-get install squashfs-tools

was needed. Should this be added to the Makefile too?

Why is the /live folder missing? This is the LMDE 201303 Cinnamon 32bit disc (DVD).
AlCantara
Level 1
Level 1
 
Posts: 10
Joined: Sun Feb 18, 2007 2:34 pm

Re: LMDE 201303 with luks encrypted lvm2 partitions

Postby Pepas on Fri May 03, 2013 1:15 am

I was using the LMDE 201303 Mate 32bit edition DVD. But after trying the Cinnamon edition, it similarly has /live/rofs/filesystem.squashfs filled with the squashfs, so it can just be copied. Can you do "md5sum /dev/sr0" (or whatever your iso is on)? It should be b82ad03d022c7ad56ef8195642494f41 for the Cinnamon32 edition (see http://blog.linuxmint.com/?p=2346).
User avatar
Pepas
Level 1
Level 1
 
Posts: 35
Joined: Mon Jan 24, 2011 10:18 am

Re: LMDE 201303 with luks encrypted lvm2 partitions

Postby AlCantara on Fri May 03, 2013 7:51 am

Hi

I downloaded and burned another Mint Cinnamon disc, with the same result.
Than I downloaded the MATE Edition, which works fine.
/live exists and installation is working well. Same computer, no changes at all.

Any idea where´s the technical difference between MATE and Cinnamon version that prevents the Cinnamon disc from working? (Despite the different desktops. I do not expect them to make any difference in the installation process, or do they?) Does the Cinnamon version running live really not have the /live folder and therefor does not work with the Makefile-Installation?

Al
AlCantara
Level 1
Level 1
 
Posts: 10
Joined: Sun Feb 18, 2007 2:34 pm

Re: LMDE 201303 with luks encrypted lvm2 partitions

Postby Pepas on Fri May 03, 2013 11:42 am

No idea why the same iso would work (or NOT work??) differently in your setup. If you get the same md5sum it really must be the same source... :?:
User avatar
Pepas
Level 1
Level 1
 
Posts: 35
Joined: Mon Jan 24, 2011 10:18 am

Re: LMDE 201303 with luks encrypted lvm2 partitions

Postby mikecolley on Tue Sep 24, 2013 1:50 am

Hi, maybe this helps - I also had errors and kept trying different things to load lmde201303 64Bit Cinnamon on 16Gig USB memory stick Sandisk flashdrive. I removed the HD out of the HP6910p first. The flashdrive is /dev/sda and I had previously gparted a 128Meg ext2 partition and a 15.xGig ext4 partition using the lmde201303 64bit cd-rom. Here are my changes to the Makefile:

Code: Select all
boot_device=/dev/sda1
crypt_device=/dev/sda2

## Specify the device where to install grub by any valid device path:
grub_device=/dev/sda

## Specify your preferred username and hostname:
username=mike
hostname=mint


I seem to think the word mint for hostname helped make it work but I could be incorrect.

The script is now 20min so far. Timezone entered just a minute ago.

I just got a fatal error:

Code: Select all
Processing triggers for gnome-menus ...
Processing triggers for desktop-file-utils ...
Processing triggers for menu ...
apt-get --yes install lvm2 linux-image-3.2.0-4-686-pae ne openssh-server tmux dcfldd iftop sysv-rc-conf colordiff htop
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package linux-image-3.2.0-4-686-pae
E: Couldn't find any package by regex 'linux-image-3.2.0-4-686-pae'
make[1]: *** [inside] Error 100
make[1]: Leaving directory `/'
make: *** [_chroot] Error 2


In another shell window:
Code: Select all
mint / # cd live
mint live # cd rofs/
mint rofs # cd filesystem.squashfs/
mint filesystem.squashfs # find . -name "linux-image-3.2.0-4-*"
./usr/share/bug/linux-image-3.2.0-4-amd64
./usr/share/doc/linux-image-3.2.0-4-amd64
./var/lib/dpkg/info/linux-image-3.2.0-4-amd64.list
./var/lib/dpkg/info/linux-image-3.2.0-4-amd64.md5sums
./var/lib/dpkg/info/linux-image-3.2.0-4-amd64.postinst
./var/lib/dpkg/info/linux-image-3.2.0-4-amd64.postrm
./var/lib/dpkg/info/linux-image-3.2.0-4-amd64.preinst
./var/lib/dpkg/info/linux-image-3.2.0-4-amd64.prerm
./var/lib/dpkg/info/linux-image-3.2.0-4-amd64.templates
.

Notice it was looking for -686-pae and on my system I have -amd64

nano Makefile

then about line 145 or somewhere in there I changed -686-pae to -amd64 and let's try it again.

Error,
Code: Select all
mount: according to mtab, sysfs is already mounted on /sys
make[1]: *** [inside] Error 32
make[1]: Leaving directory `/'
make: *** [_chroot] Error 2


I have to re-boot the DVD first and start all over.

Hope this helps, your mileage may vary.

- Mike
mikecolley
Level 1
Level 1
 
Posts: 11
Joined: Fri May 20, 2011 5:41 am

Re: LMDE 201303 with luks encrypted lvm2 partitions

Postby Pepas on Tue Sep 24, 2013 3:55 am

You are right, that Makefile was only for i686 systems. I guess it can be adapt it for both amd64 and i686, I'll look into that. :)
I'm currently running LMDE amd64 myself. :D
Last edited by Pepas on Thu Sep 26, 2013 2:52 am, edited 1 time in total.
User avatar
Pepas
Level 1
Level 1
 
Posts: 35
Joined: Mon Jan 24, 2011 10:18 am

Re: LMDE 201303 with luks encrypted lvm2 partitions

Postby Pepas on Tue Sep 24, 2013 12:24 pm

mikecolley wrote:Notice it was looking for -686-pae and on my system I have -amd64


Thanks for reporting back!
I fixed the Makefile to use the correct kernel in all cases. 8)
User avatar
Pepas
Level 1
Level 1
 
Posts: 35
Joined: Mon Jan 24, 2011 10:18 am

Re: LMDE 201303 with luks encrypted lvm2 partitions

Postby Dave90 on Fri Oct 04, 2013 5:24 am

Everything worked well other then one thing.

If I use the option Menu>Administrator>Update Manager

It says "Please enter your password":

When I do it then it simply says the password is wrong and won't let me run it.

I did the install twice and the same things happens each time.

How do I correct this problem?

Thanks
Dave90
Level 1
Level 1
 
Posts: 2
Joined: Mon Aug 26, 2013 1:18 pm

Re: LMDE 201303 with luks encrypted lvm2 partitions

Postby Paulm on Fri Oct 04, 2013 6:03 am

Have you tried using the terminal? There are two and one is root, for the root terminal go to >Applications>Accessories>Root Terminal
To run the Update Manager uses >mintupdate< in this terminal.

If this works now you can change your password using >system>Preferences>About Me

Have fun
Paulm
Level 1
Level 1
 
Posts: 22
Joined: Tue Sep 27, 2011 6:25 am

Re: LMDE 201303 with luks encrypted lvm2 partitions

Postby Pepas on Fri Oct 04, 2013 12:46 pm

Dave90 wrote:If I use the option Menu>Administrator>Update Manager
It says "Please enter your password":
When I do it then it simply says the password is wrong and won't let me run it.


That is a bug in LMDE. The root account is disabled, but Debian (LMDE) doesn't support that as well as Ubuntu (Mint).

If you just click on the 'shield' icon on the bottom right, it also brings up the update manager (because it's always running).
This one will accept your user's password.
Or, you can set a root password for those occasions that you run into bugs of this type. (I would choose a different, way harder [longer] password for this one.)
User avatar
Pepas
Level 1
Level 1
 
Posts: 35
Joined: Mon Jan 24, 2011 10:18 am

Re: LMDE 201303 with luks encrypted lvm2 partitions

Postby Dave90 on Fri Oct 04, 2013 2:32 pm

Pepas wrote:
Dave90 wrote:If I use the option Menu>Administrator>Update Manager
It says "Please enter your password":
When I do it then it simply says the password is wrong and won't let me run it.


That is a bug in LMDE. The root account is disabled, but Debian (LMDE) doesn't support that as well as Ubuntu (Mint).

If you just click on the 'shield' icon on the bottom right, it also brings up the update manager (because it's always running).
This one will accept your user's password.
Or, you can set a root password for those occasions that you run into bugs of this type. (I would choose a different, way harder [longer] password for this one.)


Actually after a couple (several :lol: ) hours on the internet and looking at the makefile I learned just what you said. The root account is disabled :wink:

I never needed it before with Ubuntu (Mint) so I don't think I need it now.
Dave90
Level 1
Level 1
 
Posts: 2
Joined: Mon Aug 26, 2013 1:18 pm

Re: LMDE 201303 with luks encrypted lvm2 partitions

Postby MoonSire on Sun Jan 26, 2014 11:54 am

There seems to be a bug in the latest version, it tries to set the swap partition to the same size as the rootpartition if you try to specify a fixed size.

Code: Select all
lvmswap=-L ${root_size}G -Zn


should be changed to

Code: Select all
lvmswap=-L ${swap_size}G -Zn



Edit:
I had to do some additions to make it work when specifying "NO" as the size for the data_size
I put the edited script here:
http://speedy.sh/S759g/makelmde
Last edited by MoonSire on Sun Jan 26, 2014 1:15 pm, edited 3 times in total.
MoonSire
Level 1
Level 1
 
Posts: 4
Joined: Sun Jan 26, 2014 11:44 am

Linux Mint is funded by ads and donations.
 
Next

Return to Installation & Boot

Who is online

Users browsing this forum: horigo and 5 guests