On Monday, 24 June 2024 02:55:33 BST Dale wrote:
> Michael wrote:
> > On Sunday, 23 June 2024 23:37:15 BST Dale wrote:
> >> Michael wrote:
> >>> On Sunday, 23 June 2024 13:19:18 BST Dale wrote:

> >> I kinda like /boot on its own partition.  If /boot gets corrupted
> >> somehow, I can get the kernel and config again from /usr/src/linux.
> >> Building the init thingy again is trivial.  So is reinstalling grub.  If
> >> I were to lose root somehow, I'd have to reinstall but I got the kernel
> >> and its config file.  It ain't much but it's something.  As it is, /boot
> >> is on the same partition as root.  If root goes bad, all is lost, except
> >> for any backup copies I might have.  If I redo the install, I'd have a
> >> EFI partition and a separate /boot partition as well.  The EFI would be
> >> like 8MBs or so and the /boot partition would be ext2 and 8GBs or so.
> >> Plenty of room for expansion.
> > 
> > I see.  I don't think you need to redo the install.  All you need to do
> > is:
> > 
> > 1. Back up the ESP contents, just in case.
> > 2. Shrink the ESP partition, down to a reasonable size.  500M or 1G would
> > be more than enough.
> > 3. Create a new partition, say ~7G in the space your just freed up, of
> > type
> > 8300.
> > 4. Check if the content of the ESP fs is intact (it should be, but we're
> > talking about FAT here) and if not reformat as FAT32 and copy over the
> > files from the ESP backup.
> > 5. Format the new /boot partition and copy over the files from your
> > current / boot tdirectory to the new /boot partition you created.
> > 6. Adjust your fstab and reboot.
> > 
> > NOTE: The GPT partition numbering order will be messed up, but this does
> > not alter their functionality.  If it annoys you, then use gdisk to
> > re-order them.
> Oh, I'd mess that up quick.  o_O 

Unlikely.  :-)

Press s to ... sort.

Check 'man gdisk' for the 3 menus of gdisk and their commands.  Anyway, the 
numbering of partitions as stored in the GPT tables is of less importance if 
you use UUIDs in your fstab.


> >> I'm going to compare some data between the Gentoo live DVD and my
> >> install.  If I don't see something obvious, I'm going to fix my
> >> partition boo boo with a fresh start.  While at it.  What is the best
> >> way to wipe the partition data from a m.2 stick?  They not spinning rust
> >> so don't want to try to dd or use shred on the whole thing.  Doesn't
> >> gdisk have a wipe partition option?  Curious what you think is the best
> >> way to do that.  Don't want to shorten the life of my m.2 stick.
> > 
> > In this case do not reinstall.  Most of it, if not all, would be
> > unnecessarily deleting and rewriting the same data.
> > 
> > gdisk can destroy all the GPT data structures on a disk.  Press x, then z.
> > However, I suggest you don't this.  Use Gparted to shrink your ESP and add
> > a new partition for /boot as I explained above.  The focus on sorting out
> > your graphic card.
[snip ...]

> Now to ponder what comes next. 
> 
> Dale
> 
> :-)  :-) 

Well, before you consider what comes next, you should consider what comes 
first.  If you must reinstall, then you may want to erase securely all data on 
the NVMe disk instead of just deleting the GPT tables.  You can use nvme-cli 
for secure deletion of your data; e.g. for /dev/nvme0n1:

nvme format /dev/nvme0 --namespace-id=1 --ses=1 --pi=1

Wait until it completes and do not interrupt it.

(man nvme-format for more information).

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to