Tag Archives: Debian

Add storage and format disk in Debian

sudo fdisk -l
# take note of the added disk
sudo fdisk /dev/sdX
# where X is the value for the disk

# in fdisk:
n (ew)
p (rimary)
1
(first and last sector defaults)
w (rite)

sudo fdisk -l
# take note of disk partition, eg: sdX1
sudo mkfs -t ext4 /dev/sdX1

sudo mkdir /mnt/newdisk
lsblk -d -fs /dev/sdX1
# take note of UUID value
# edit /etc/fstab to add the following
UUID=$UUIDValueFromAbove /mnt/newdisk ext4 defaults 0 2

sudo mount -a
# or reboot to test

References:

https://linuxconfig.org/how-fstab-works-introduction-to-the-etc-fstab-file-on-linux

https://linuxconfig.org/how-to-add-new-disk-to-existing-linux-system

Upgrading Debian Buster to Bullseye

sudo apt update
sudo apt -y remove apt-listchanges
sudo apt -y upgrade
sudo apt -y full-upgrade
sudo apt -y autoremove
sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list
sudo sed -i 's/buster/bullseye/g' /etc/apt/sources.list.d/*.list
sudo sed -i 's#/debian-security bullseye/updates# bullseye-security#g' /etc/apt/sources.list
export LC_ALL=C 
sudo apt update
sudo apt -y upgrade
sudo apt -y full-upgrade
sudo apt -y autoremove

References: https://linuxize.com/post/how-to-upgrade-debian-10-to-debian-11/

 

Prevent apt-get upgrade from showing the change log

I was scheduling an apt-get update && apt-get –y upgrade on a Debian 8 box and the process stopped waiting for keyboard input showing the change logs for CA-Certificates.

it had actually started VI and was displaying a text file.  This would stop the automatic update process.

To prevent this I ran apt-get –y remove apt-listchanges

References:

https://serverfault.com/questions/835303/is-there-a-way-to-make-apt-get-upgrade-not-show-changelogs