Make a bootable ISO from an install CD/DVD in Linux

It’s been a while since I last did this but you never know when you might need it.  When you see a “dd” command, you better make sure you know what you are doing.  In other words, don’t type this just as you see it!

Identify where CD/DVD is mounted:

mount

Unmount the CD/DVD:

umount /dev/sr0

Copy data from CD/DVD to ISO file:

dd if/dev/sr0 of=~/image.iso

Or use dcfldd if you prefer:

dcfldd if/dev/sr0 of=~/image.iso

Ubuntu Server – Manually removing kernel packages

UPDATE: Looks like a one-liner was added to apt-get a few years back that simplifies the older and more manual way which I documented below. This also affects more than just the old kernels so use with caution:

apt-get autoremove --purge

After a number of kernel upgrades the file system gets filled up. Here is one way to clean up.

As root –

Display a list of installed kernel packages:

dpkg -l | grep linux-image

Display the running kernel (you don’t want to really remove this one do you?):

uname -a

After careful observation, remove the packages:

apt-get purge linux-image-3.2.0-23-generic, linux-image-3.2.0-24-generic

As a side, I tend to leave one additional kernel installed as a backup, unless there is a serious security/bug issue.

Combine multiple PDF files into a single PDF file

This is one of the oldest entries in my offline notes.  I used it quite a bit years ago.  Simply said, take several .pdf files and combine them into one file.

As always boys and girls – “man gs” in the terminal before you do this.*

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=final.pdf file1.pdf file2.pdf file3.pdf

 

*As a side note:  some of the options in the above command are not in the man page on my Debian 9 system.  Man says you may need to install ghostscript-doc and view the pages in /usr/share/doc/ghostscript/

**Looks like “-o” is a shorthand to replace the “-dBATCH -dNOPAUSE” combination.  https://www.ghostscript.com/doc/9.20/Use.htm