You are not logged in.
Hi everybody,
in the past days I get busy in the trying to get a working installation with no partitions, nor gpt and even mbr, with btrfs on the entire plain encrypted drive with subvolume, but without succeeding.
I ran out of ideas and already searched the web and the forum that's why I'm here looking for you're kind help.
This is what I've reached so far.
- cryptsetup open --type=plain /dev/sda sda
- mkfs.btrfs -m dup -d dup /dev/mapper/sda
- mount -t btrfs -o rw,autodefrag,noatime,nodiratime,compress=none,space_cache,inode_cache /dev/mapper/sda /mnt
- btrfs subvolume create /mnt/@1
- btrfs subvolume create /mnt/@2
- btrfs subvolume create /mnt/@3
- btrfs subvolume create /mnt/@4
- mkdir -p /mnt/{boot,usr,var,home}
- mount -t btrfs -o rw,autodefrag,noatime,nodiratime,compress=none,space_cache,inode_cache,subvol=@1 /dev/mapper/sda /mnt/boot
- mount -t btrfs -o rw,autodefrag,noatime,nodiratime,compress=lzo,space_cache,inode_cache,subvol=@2 /dev/mapper/sda /mnt/usr
- mount -t btrfs -o rw,autodefrag,noatime,nodiratime,compress=lzo,space_cache,inode_cache,subvol=@3 /dev/mapper/sda /mnt/var
- mount -t btrfs -o rw,autodefrag,noatime,nodiratime,compress=lzo,space_cache,inode_cache,subvol=@4 /dev/mapper/sda /mnt/home
[Installed Arch and inside chroot issued the following]
- pacman -Syu grub
- vi /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="root=/dev/mapper/sda cryptdevice=/dev/sda:sda rw rootflags=subvol=/@1"
GRUB_PRELOAD_MODULES="dm-crypt"
- vi /etc/mkinitcpio.conf
MODULES="crc32 crc32_generic crypto-crc32 libcrc32c dm-crypt btrfs i915"
HOOKS="base udev autodetect modconf block encrypt filesystem keyboard keymap consolefont")
- mkinitcpio -p linux
- grub-install --target=i386-pc --recheck --boot-directory=/boot --force /dev/mapper/sda
- grub-mkconfig -o /boot/grub/grub.cfg
- exit
- umount -R /mnt
- reboot
At booting it still can't find a bootable device.
TIA
Last edited by rix (2019-03-28 17:31:24)
Offline
not partitioning a drive means risking corruption every time a program "helpfully" creates a partition table for you. windows does it, various linux software too.
using cryptsetup open plain without specifying cipher means relying on defaults of the cryptsetup program. these defaults change over time, so it will break.
you need a bootloader and you have none. encrypted grub can not decrypt itself, hen and egg problem. so again you need a partition table and unencrypted bootloader or a separate boot device.
(I'm not sure if grub supports plain crypt or luks only. For plain crypt grub also needs to be told which cipher to use.)
edit: according to https://www.gnu.org/software/grub/manua … ryptomount
> GRUB suports devices encrypted using LUKS and geli.
and there is no way to specify a cipher, so I assume there is no plain crypt support in grub
Last edited by frostschutz (2019-03-28 17:47:02)
Offline
Please use code tags when pasting to the boards: https://wiki.archlinux.org/index.php/Co … s_and_code
Offline
Thanks for the answer.
I already know about the first two observations but I'd like to try out of curiosity.
About the hen and egg thing how does it work? I mean I've read of people that accomplish such form of installation. Even W0ng in the Arch forum if I don't get it wrong. https://github.com/w0ng/wongdev.com/blo … llation.md
Edit: I didn't know about grub and plain thanks.
@jason: I know and I am really sorry but I've some problems with sight and the device I'm writing on. Excuse me.
Last edited by rix (2019-03-28 17:58:41)
Offline
About the hen and egg thing how does it work? I mean I've read of people that accomplish such form of installation. Even W0ng in the Arch forum if I don't get it wrong. https://github.com/w0ng/wongdev.com/blo … llation.md
And where does that mention encryption?
Having an entire installation on partitionless btrfs drives is possible as long as you're not booting in UEFI mode (it's how my machine is set up). It's the encryption that's the deal-breaker here.
Offline
You're absolutely right even if I've read about both cases and I can't do it with or without encryption so I've thought I was doing something in the wrong way. W0ng post was just an example.
Offline