You are not logged in.

#1 2013-06-08 10:11:34

morfik
Member
From: Europe/Poland
Registered: 2013-03-14
Posts: 24
Website

Using genfstab script under ubuntu live-cd

I tried to install debian using ubuntu live-cd (debootstrap), and I also wanted to generate /etc/fstab file. This is my disk:

root@ubuntu:/home# lsblk -o name,fstype,mountpoint,label,uuid,ro,rm,size,type
NAME                        FSTYPE      MOUNTPOINT         LABEL             UUID                                   RO RM   SIZE TYPE
sda                                                                                                                  0  0  74.5G disk
├─sda1                      ntfs                           WinXP             5668FA8468FA6263                        0  0    28G part
├─sda2                      ext4        /mnt/boot          boot              27e5bccf-256b-4239-a3a4-c0ed81892869    0  0   957M part
├─sda3                                                                                                               0  0     1K part
├─sda5                      crypto_LUKS                                      a8bf24ad-c8da-4a4b-bb1b-647144a873c8    0  0  18.6G part
├─sda6                      crypto_LUKS                                      194f4523-475d-45e7-9bfe-e1fe500c250a    0  0  18.6G part
│ └─sda6_crypt (dm-0)       LVM2_member                                      k54xxU-RxHg-agNb-M2cY-AQh4-sKzx-PxRSBD  0  0  18.6G crypt
│   ├─deb_crypt-root (dm-1) ext4        /mnt               root              27cf5e5f-ffaa-4db0-8337-ecff43656386    0  0    12G lvm
│   ├─deb_crypt-home (dm-2) ext4        /mnt/home          home              1cbeec68-59c9-4d46-9db8-dfff06f13018    0  0     3G lvm
│   ├─deb_crypt-tmp (dm-3)  ext4        /mnt/tmp           tmp               b55c540a-573a-42a5-a648-bc037e2eb23f    0  0     2G lvm
│   └─deb_crypt-swap (dm-4) swap        [SWAP]                               e0b1508e-ab42-4a88-8eda-1cc11a52097e    0  0   1.6G lvm
└─sda7                      ext4        /mnt/media/backup  backup            c751ab48-fe9b-4c83-920e-d3205c6ba7ff    0  0   8.4G part
sdb                                                                                                                  0  1  14.5G disk
├─sdb1                      ext4        /media/ubuntu/arch arch              77ef557b-c739-4d96-8072-1aa8ac2ab20f    0  1   6.6G part
├─sdb2                                                                                                               0  1   4.9G part
└─sdb3                      vfat        /media/ubuntu/fat  fat               9798-CEE7                               0  1   3.1G part
sr0                         iso9660     /cdrom             Ubuntu 13.04 i386                                         0  1   4.4G rom
loop0                       squashfs    /rofs                                                                        1  0 757.3M loop

And this is what I got using genfstab script:

root@ubuntu:/home# ./genfstab -p -U /mnt 
findmnt: unknown column: FSROOT
# /dev/mapper/deb_crypt-swap
UUID=e0b1508e-ab42-4a88-8eda-1cc11a52097e	none      	swap      	defaults  	0 0

It makes only one entry -- for swap. When I'm using arch live-cd + debootstrap from AUR, everything is ok.

Is there a way to include debootstrap in arch live cd? This is a great tool for setting another linux distro.

Offline

#2 2013-06-08 10:33:56

teateawhy
Member
From: GER
Registered: 2012-03-05
Posts: 1,138
Website

Re: Using genfstab script under ubuntu live-cd

You can generate the arch live cd including your own packages with this:
https://wiki.archlinux.org/index.php/Archiso

Offline

#3 2013-06-09 00:01:13

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Using genfstab script under ubuntu live-cd

Y'know what else generates an /etc/fstab file for Debian is the Debian installation scripts.  It may be a good idea to explain exactly why you're using another LiveCD to install Debian (since the ability to use that CD makes it clear that you can easily just, y'know, install Debian with a Debian installation disc or network image).  But if that's really not an option for you, the Arch installation scripts are available for download.

If I had to guess, I'd say something about auto-mounting partitions and the presence of systemd make the difference, but I'm not certain.

Offline

#4 2013-06-09 01:08:11

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Using genfstab script under ubuntu live-cd

genfstab requires a very recent util-linux. The version of findmnt you have on the ubuntu live media doesn't support all the columns needed.

Last edited by falconindy (2013-06-09 01:09:41)

Offline

#5 2013-06-09 03:12:38

morfik
Member
From: Europe/Poland
Registered: 2013-03-14
Posts: 24
Website

Re: Using genfstab script under ubuntu live-cd

@teateawhy -- thanks, I will take a closer look at it.

@ANOKNUSA -- I want to install debian from scratch, and this can be done by using debootstrap. It is similar to pacstrap. I'm using LUKS as you could see, and I can't simply install the system using debian installer because it can't open encrypted volume. So, I have to set everything up each time I want to install debian, and this is somehow boring. I just want to use the same encrypted lvm. smile

@falconindy -- hmm, I'll try to update some packages, maybe this will solve the problem.

Last edited by morfik (2013-06-09 03:13:04)

Offline

#6 2013-06-09 20:29:15

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Using genfstab script under ubuntu live-cd

morfik wrote:

@falconindy -- hmm, I'll try to update some packages, maybe this will solve the problem.

No, I assure you that's the problem. You'll need at least util-linux 2.19 (released over 2 years ago).

Offline

#7 2013-06-10 07:24:20

morfik
Member
From: Europe/Poland
Registered: 2013-03-14
Posts: 24
Website

Re: Using genfstab script under ubuntu live-cd

I have util-linux v. 2.20.1-5.4.
I tried update the package to 2.23.1 but I couldn't do this. There is no higher version of this package in debian sid or even in ubuntu. So, I tried to build it from source, and this broke my system. xD I think it's impossible to do this right now, I'll have to wait for an update and then try again.

Anyway, thanks for the info.

Offline

#8 2013-06-10 17:14:32

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: Using genfstab script under ubuntu live-cd

Ah, my mistake -- v2.22 added the FSROOT column (damn, I wrote this commit myself)

https://github.com/karelzak/util-linux/ … b2175b0744

Offline

#9 2013-06-10 18:21:21

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: Using genfstab script under ubuntu live-cd

If your main concern is the LUKS containers, might you be able to just write out an fstab for those and fill in the rest later?  If nothing else, you could just grab the one on the installation image and change the values to match, or use the extra-simple example on the Debian wiki.  I'm kinda surprised something like debootstrap (which I didn't know about before) wouldn't have something similar to genfstab.

Offline

Board footer

Powered by FluxBB