Tuesday, 31 December 2024

debian nocloud genesis

 After birth, several things need putting up:

When you get a nocloud image from debian, you must adduser, there is no UID=1000 yet. Supposing you have already battled with virt-manager to set it up.

The nocloud variant is a minimal installation, not an installer.

Something like this:
sudo qemu-img resize /media/s/be365...5/steve/virt/debian-13-nocloud-amd64-daily-20241229-1976.qcow2 +9G
Then go in there and:
sudo fdisk /dev/vda
Enter (p) to see this:
Disk /dev/vda: 11 GiB, 11811160064 bytes, 23068672 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 25D941F1-04D7-C848-B8D8-49467B6D2ED0

Device      Start     End Sectors  Size Type
/dev/vda1  262144 4192255 3930112  1.9G Linux root (x86-64)
/dev/vda14   2048    8191    6144    3M BIOS boot
/dev/vda15   8192  262143  253952  124M EFI System
And note that vda1 comes after the other two on disk, right next to (F):
Unpartitioned space /dev/vda: 9 GiB, 9664708096 bytes, 18876383 sectors
(d) to delete partition 1! Yes really. It will warn you this is a bit nuts. Then (n) create it again, all default options. Don't erase the filesystem signature when asked, it will be healed in the next step. Then (w) to write changes.
Now with the extra space around it, grow the filesystem:
sudo resize2fs /dev/vda1
Which should do something.

Time Passes


Now just be careful because unfortunately I broke its ability to boot:
That's all she wrote. I was installing sway to try wl-copy somewhere else because it doesn't like copying webp, it was a hectic time, but it wasn't a great reason to kill a system...

So I may redo it all... Not sure.

I should have made some:

Snapshots

Since virtual, we can easily access the storage while it's not running.
Click that blue orb, 
Copy that path to your storage,
Claim your moment in time's meaning. Oh, you get a timestamp for free!

Soon after separating into time comes the incident of rebasing bits of work that have been lost, etc. 

I should be using this image as a backing file and have another qcow2 for each instance of trixie I want, in case I ever want more of them.

All of the above should be automated by some nice tool.

Thanks!










No comments:

Post a Comment