Quantcast
Channel: Debian User Forums
Viewing all articles
Browse latest Browse all 3474

Can AI do this job?

$
0
0
I am curious whether the AI large language models can give answers to some of the questions I bring to user forums. So I asked AI (Brave's Leo) how I would do the following prompt:
How do I install Debian 12 on an existing LUKs encrypted LVM with `/home`, `/root`, and `/swap` subvolumes, leaving the `/home` subvolume unformatted?
This is the script it generated:
1. Boot into a live Debian environment.
2. Open a terminal and identify the encrypted partition with `

Code:

lsblk
` or `

Code:

fdisk -l
`.
3. Decrypt the partition with `

Code:

cryptsetup open /dev/sdaX luks-home
` (replace sdaX with your partition).
4. Identify the LVM volume group with `

Code:

sudo vgscan
` and activate it with `

Code:

sudo vgchange -a y luks-home
`.
5. Mount the root partition:
- `

Code:

sudo mount /dev/mapper/luks-home-root /mnt
`
6. Create a new ext4 filesystem for the `/home` subvolume:
- `

Code:

sudo mkfs.ext4 /dev/mapper/luks-home-home
`
7. Create a new swap partition (optional):
- `

Code:

sudo mkswap /dev/mapper/luks-home-swap
`
8. Install Debian 12 as usual, but exclude the `

Code:

/home
` partition during the installation process.
9. After installation, update the system and mount the encrypted partition:

- `

Code:

sudo mount /dev/mapper/luks-home /home
`
10.

Code:

Chroot
into the new system and create a new

Code:

initramfs
with the encrypted partition:
- `

Code:

sudo update-initramfs -u -k all
`
11. Reboot the system.
Remember to replace sdaX with your actual partition names.

How did it do? Will following this script brick my computer?

Statistics: Posted by mattikins — 2024-03-03 02:52 — Replies 1 — Views 38



Viewing all articles
Browse latest Browse all 3474

Trending Articles