Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

Can AI do this job?

Off-Topic discussions about science, technology, and non Debian specific topics.
Post Reply
Message
Author
User avatar
mattikins
Posts: 21
Joined: 2023-11-25 18:22
Location: matthewcharlesallen@outlook.com
Has thanked: 2 times

Can AI do this job?

#1 Post by mattikins »

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: Select all

lsblk
` or `

Code: Select all

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

Code: Select all

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

Code: Select all

sudo vgscan
` and activate it with `

Code: Select all

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

Code: Select all

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

Code: Select all

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

Code: Select all

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

Code: Select all

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

- `

Code: Select all

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

Code: Select all

Chroot
into the new system and create a new

Code: Select all

initramfs
with the encrypted partition:
- `

Code: Select all

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?

User avatar
sunrat
Administrator
Administrator
Posts: 6511
Joined: 2006-08-29 09:12
Location: Melbourne, Australia
Has thanked: 119 times
Been thanked: 489 times

Re: Can AI do this job?

#2 Post by sunrat »

Moved to Off-Topic as it's discussion rather than a support question.
I wouldn't trust AI for something like that. You can try it and report back. :wink:
“ computer users can be divided into 2 categories:
Those who have lost data
...and those who have not lost data YET ”
Remember to BACKUP!

User avatar
cds60601
df -h | participant
df -h | participant
Posts: 739
Joined: 2017-11-25 05:58
Location: Florida
Has thanked: 138 times
Been thanked: 65 times

Re: Can AI do this job?

#3 Post by cds60601 »

Agreed - if you have the means to do so, it may take additional time to find out, try this within a VM.
Of course, this may be easier said than done. But at least its an option to consider while still keeping your original install left untouched.
Interesting though, that forums "could" be replaced by AI.
Supercalifragilisticexpialidocious

User avatar
donald
Debian Developer, Site Admin
Debian Developer, Site Admin
Posts: 1106
Joined: 2021-03-30 20:08
Has thanked: 189 times
Been thanked: 248 times

Re: Can AI do this job?

#4 Post by donald »

lol you guys ignore the AI part, look at the structure. :D

The syntax is surprisingly correct for the task you asked of it. A nuance here or there from experience would tune a bit better but the commands and order are 'correct'.

In time an AI can perform to better scale some of these tasks that seem complicated, you think some script professional in your DC didn't write the same script when you upgraded from your starting dedicated server to a more robust server?

Pause server, snapshot, backup, (image) expand partitions, checkfs, remove pause. Same un-difference, just done faster with no employee typos. (I'd be out of a job in picoseconds :( )
Typo perfectionish.


"The advice given above is all good, and just because a new message has appeared it does not mean that a problem has arisen, just that a new gremlin hiding in the hardware has been exposed." - FreewheelinFrank

dlu2021
Posts: 211
Joined: 2021-08-13 19:55
Location: Minnesota
Has thanked: 7 times
Been thanked: 41 times

Re: Can AI do this job?

#5 Post by dlu2021 »

mattikins wrote: 2024-03-03 02:52 6. Create a new ext4 filesystem for the `/home` subvolume:
- `

Code: Select all

sudo mkfs.ext4 /dev/mapper/luks-home-home
`
If the goal is to keep the home partition untouched, isn't step 6 incorrect?

User avatar
dilberts_left_nut
Administrator
Administrator
Posts: 5347
Joined: 2009-10-05 07:54
Location: enzed
Has thanked: 13 times
Been thanked: 66 times

Re: Can AI do this job?

#6 Post by dilberts_left_nut »

"AI" can only tell you what someone else has already written.
AdrianTM wrote:There's no hacker in my grandma...

Post Reply