====== [hemmerling] Debian Linux 1/4 ====== Related page: *[[linux01.html|Linux 1/8]]. *[[debian02.html|Debian Linux 2/4]]. *[[debian03.html|Debian Linux 3/4]]. *[[debian04.html|Debian Linux 4/4]]. ===== Debian OS Installation from downloaded DVD ISO Images ===== ==== Using "Rufus 4.9.2256" on Windows to prepare a USB Stick as Media for Debian Installer or Debian Live ==== === Drive Properties for "Debian Live 12.10" === ***Persistant partition size = "3" GB**. *Partition Scheme: "MBR". *Target system: "BIOS or UEFI". *[x] List USB Hard Drives. *[x] Add fixes for old BIOSes ( extra partition, align, ect. ). *[_] Enable runtime UEFI media validation. *UEFI media validation might be very time intensive, thats why there is the option at boot time "[Press any key to cancel]". *"Debian Live" offers the menu item "Utilities... / Verify integritey of the boot medium". === Drive Properties for "Debian Installer 12.10" === ***Persistant partition size = "0" GB**. *Partition Scheme: "MBR". *Target system: "BIOS or UEFI". *[x] List USB Hard Drives. *[x] Add fixes for old BIOSes ( extra partition, align, ect. ). *[_] Enable runtime UEFI media validation. === Format Options === *File system: "FAT32 ( Default )". *[x] Quick Format. *[x] Create extended label and icon files. *[_] Check device for bad blocks. === Selecting the proper Grub Version for Debian === *Rufus "4.9.2256" message, when trying to transfer a "Debian Live 12.10" image to a USB stick, for the first time: Download required. This image uses Grub 2.06-13-deb12u1 but the application only includes the installation files for Grub 2.12. As different versions of Grub may not be compatible with one another, and it is not possible to include them all, Rufus will attempt to locate a version of the Grub installation file ( "core.img" ) that mateches the one from your image. - Select "Yes" to connect to the Internet and attempt to download it. - Select "no" to use the default version from Rufus. - Select "Cancel" to abort the operation. Note: The file will be downloaded in the current application directory and will be reused automatically if present. If no match can be found online, then the default version will be used. *I selected "Yes". === ISOHybrid Images & DD Mode === *[[http://wiki.debian.org/DebianInstall|Debian Wiki "DebianInstall"]]. *"Creating a Bootable Debian USB Flashdrive... To create a bootable USB drive from Microsoft Windows or Mac OS a usable choice is Rufus. Warning: **Rufus has 2 writing modes "ISO" and "DD" mode, which you can select just before writing begins. For Debian installer images or Debian live images, you MUST select the "DD" writing mode** -- ISO mode will alter the copy of the image on the target media (confirmed August 27, 2021, using rufus version 3.15)". *My experience: Rufus 4.9.2256 doesn't detect ISOHybrid mode of "Debian Live" or "Debian Installer" images and so doesn't offer "DD" mode. But everything works fine :-). *[[http://www.github.com/pbatard/rufus/issues/1148|GitHub "pbatard / rufus" Issues - "DD mode gone in version 3?"]]. ==== Debian Installation of several Debian DVDs from one single USB Stick === *Does it work, to create first a bootable USB stick by the "Rufus" ISO2USB tool, and then to copy the 2 additonal DVDS into subdirectories "debian2" and "debian3"? -Sufficient disk space on a 14GB USB stick? YES, for Debian 10.7 :-) -Does the installer "aptitude" find the installable applications, if the USB stick is available at "/media/cdrom/", by soft link ? Yes, it finds and scans the directories of the 2nd and 3rd DVD ( e.g. "debian2", "debian3" ), properly :-). ===== Basic Installation Parameters === *Installation Parameters. *Language = "English". *Region = "Ireland". It isn't possible to set "Germany" as region :-(. *Keyboard = "Germany". *Debian Gnome app "Settings": *"Automatic Time Zone" = "UTC+2 = CEST ( Berlin, Germany )". ===== Swap Space ===== ==== Modern Swap Space ==== *Debian Linux 12.10 sets the swap space to 1 GB filespace, no matter of the size of the computer RAM. ==== Vintage Swap Space ==== *Experts told me in the late 1990th, that even if a PC just has 16 or 32 MByte RAM, the Linux swapspace should be 128 MB on the harddisk. ==== Resources ==== *[[http://phoenixnap.com/kb/swap-space|phoenixNAP "Swap Space in Linux: What It Is & How It Works"]]#. *"CentOS... Swap space should be twice the size of RAM in case the RAM amount is below 2 GB". *"Ubuntu/Debian... If there is less than 1GB of RAM, the swap size should be at least the amount of RAM and, at most, double the amount of RAM. If there is more than 1GB of RAM, the swap size should be at least the square root of the RAM amount and, at most, double the RAM amount. cat /proc/swaps free -m ===== Network ===== ==== Permanent IP4 Address ==== *Application "Settings" - "Network / Wired / IP4 /Manual". *Addresses "192.168.178.3", Netmask "0.0.0.0", Gateway "192.168.178.1". ==== /etc/hosts ==== *Add the local hosts name "node1" ( DSL router ) & "node4" ( where the local web server is running ) to "/etc/hosts" of device "node3": 127.0.0.1 localhost 127.0.1.1 node3 node3 192.168.178.1 node4 node1 192.168.178.4 node4 node4 ==== SSH ==== *If checked by Debian Linux installation, OpenSSH is properly installed and started as service at boot time. *[[http://www.phoenixnap.com/kb/how-to-enable-ssh-on-debian|Phoenixnap "How to Enable SSH on Debian 12"]]. ==== SSH Access by Win10Pro ==== *"OpenSSH" is optional, preinstalled feature. Check if it is installed by "System ( Settings ) / Optional features" - "OpenSSH Client". *Connect to Debian Linux PC ( 192.168.178.3, "node3" ), default user "node3" ssh node3@192.168.178.3 ssh node3@node3 ===== "su", "su -" and "sudo" ===== ==== PATH ==== *Default user: $printenv PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games *su ( root ): $su $printenv PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games *su - ( root ): $su - $printenv PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin ==== Add a user "USERNAME" to the "sudo" group, as first and only user ==== $su - Password: # $apt install sudo $usermod -aG sudo USERNAME $getent group sudo ==== Alternative ( unnecessary complex ? ) Instructions for Debian 10.7 ==== *Add the USERNAME ( of the user as which you are logged in ) to the group "sudoers". -( Open a terminal ). -su root -( Input root password. root is already member of the group "sudoers" :-) ). -apt-get install sudo -y -//su -// -adduser **username** sudo -//logout// -chmod 0440 /etc/sudoers -exit -sudo reboot -( Input root password ). -( reboot manually if "sudo reboot" doesn't work ) ==== Resources ==== *With Debian Linux, the default user is not member of the group "sudoers". This is unexpected, from point of use of an Ubuntu user!!! *If you try any administrative tasks starting with "sudo", even after giving the right password, you are rejected by Username Is Not In The Sudoers File. This Incident Will Be Reported *Especially, the "GDebi Package Installer" quits without error message after entering the right password :-(. *[[http://en.wikipedia.org/wiki/Su_%28Unix%29|EN.Wikipedia "su (Unix)"]], [[http://de.wikipedia.org/wiki/Su_%28Unix%29|DE.Wikipedia "su (Unix)"]]. *[[http://en.wikipedia.org/wiki/Sudo|EN.Wikipedia "sudo"]], [[http://de.wikipedia.org/wiki/Sudo|DE.Wikipedia "sudo"]]. *[[http://wiki.debian.org/sudo/|Debian Wiki "sudo"]]. *Debian: *[[http://www.reddit.com/r/linuxquestions/comments/pcfjo6/bash_usermod_command_not_found_in_latest_debian/|reddit "/r/linuxquestions" - "bash: usermod: command not found (in latest Debian 11 install)"]] - "You probably used **su** to become root. Try using **su -** instead". *[[http://www.cloudpanel.io/tutorial/how-to-add-user-to-sudoers-in-debian/|CloudPanel "How to Add User to Sudoers in Debian"]]. *[[http://unix.stackexchange.com/questions/179954/username-is-not-in-the-sudoers-file-this-incident-will-be-reported|StackExchange "Username is not in the sudoers file. This incident will be reported"]]. *[[http://unix.stackexchange.com/questions/565665/bash-adduser-command-not-found-debian-buster|StackExchange "bash: adduser: command not found [Debian Buster]"]]. *[[http://www.techrepublic.com/article/how-to-install-sudo-on-a-debian-minimal-server/|TechRepublic "How to install sudo on a Debian minimal server"]]. *[[http://debianforum.de/forum/viewtopic.php?t=175456|Debian Forum "Unterschied su und su - root ?"]]. *"Es genügt su -, und durch den Bindestrich bekommst du eine login-shell, was dir die Umgebungsvariablen des Benutzers gibt, zu dem du wechselst (ohne Angabe ist das root)". *"Der PATH, der bei su gesetzt wird, beinhaltet nicht mehr /sbin und /usr/sbin, wodurch einige Programme nicht mehr durch Kurzeingabe des Programmnamens erreichbar sind. Durch Langeingabe geht es aber weiterhin". *Ubuntu: *[[http://www.thegeekstuff.com/2009/09/ubuntu-tips-how-to-login-using-su-command-su-gives-authentication-failure-error-message/|The Geek Stuff "Ubuntu Tips: How To Enable Root User ( Super User ) in Ubuntu"]]. *[[http://www.tecmint.com/fix-user-is-not-in-the-sudoers-file-the-incident-will-be-reported-ubuntu/|Techmint "How to Fix 'Username is not in the sudoers file. This incident will be reported” in Ubuntu']] - This does not work for me. ===== Package Management & Package Installation ===== ==== apt-get - Add the CD/DVD with it's proper Title to /etc/apt/sources.list, or comment out the name ==== *You may get the error message "Media change: please insert the disc labeled", by using the "apt-get install PACKAGE" command. *One of the reasons might be, that the operating system was installed by USB stick. *Fix: -Commenting out the CD/DVD as source for installation at "/etc/apt/sources.list". This makes you depend on Internet installation :-(, but the only way to enable successful operation of "sudo apt-get update" :-). sudo gedit /etc/apt/sources.list -If you add the CD/DVD with it's proper title, installation is done by CD/DVD data, but successful operation of "sudo apt-get update" is disabled :-(: apt-cdrom add ==== aptitude ==== *"aptitude" is not installed by default, with virgin out-of-the-box Debian Linux 12.10. It is an ANSI / VT100 terminal application, i.e. it runs in textmode. *Installation: sudo apt-get install aptitude ==== dpkg-deb ==== ==== GDebi ==== *Installation: sudo apt-get install gdebi *[[http://simple.wikipedia.org/wiki/GDebi|SIMPLE.Wikipedia "GDebi"]] - "GDebi is a computer program that runs on Linux and can install .deb packages. It is available with a graphical interface, but also has a command line option". ==== Synaptic Package Manager ==== *Successful call of the application: $sudo /sbin/synyptic $su Password: $/sbin/synyptic *The application doesn't start in "su -" ( root ) mode, it quits with an error message $su - Password: $/sbin/synaptic Probably you're running Synaptic on Wayland with root permission. Please restart your session without Wayland, or run Synaptic without root permission. *The application is not intented to work in user mode, it displays a notice: $/sbin/synaptic Starting "Synaptic Package Manager" without administrative privileges. You will not be able to apply any changes, but you can still export the marked changes or creae download script for them. *[[http://www.nongnu.org/synaptic/|Synaptic Package Manager]]. *[[http://wiki.debian.org/Synaptic|Debian Wiki "Synaptic"]] - "Synaptic is installed by default in Debian if you choose the desktop task". *[[http://www.linuxquestions.org/questions/debian-26/run-synaptic-with-wayland-enviroment-4175684684/|LinuxQuestions "Run synaptic with Wayland enviroment"]]. *[[http://forums.debian.net/viewtopic.php?f=6&t=142634|Debian Users Forum "Wayland,Synaptic continue without administrative privileges"]]. *[[http://www.debianforum.de/forum/viewtopic.php?t=174341|Debian Forum "[gelöst]Debian 10 Gnome 3.xx Synaptic unter Wayland"]]. ==== tasksel ==== ==== Resources ==== === apt-get, apt-cdrom === *[[http://www.askubuntu.com/questions/301484/how-do-i-update-ubuntu-manually|Ask Ubuntu "How do I update Ubuntu manually?"]]. $sudo apt-get update $sudo apt-get upgrade $sudo apt-get dist-upgrade *[[http://unix.stackexchange.com/questions/125859/media-changed-please-insert-the-disk-labeled-debian-gnu-linux|StackExchange "'media change: please insert the disc labeled' when trying to install Ruby on Rails [duplicate]"]]. *"/etc/apt/sources.list". *[[http://help.ubuntu.com/community/AptGet/Howto/|Ubuntu Documentation "AptGet/Howto"]]. $apt-get install PACKAGENAME $apt-get remove PACKAGENAME $apt-get purge PACKAGENAME $apt-get remove --purge PACKAGENAME *[[http://help.ubuntu.com/community/AptCdrom|Ubuntu Documentation "AptCdrom"]]. === Package Installation === *[[http://www.askubuntu.com/questions/40779/how-do-i-install-a-deb-file-via-the-command-line|askUBUNTU "How do I install a .deb file via the command line?"]]. *"Unable To Locate Package". *[[http://www.zoomadmin.com/HowToInstall/UbuntuPackage/lua-check|ZoomAdmin "How To Install 'lua-check' Package on Ubuntu"]]. -"sudo apt-get update -y". -"sudo apt-get install -y lua-check". *Error message "E: Unable to locate package lua-check" :-(. *[[http://askubuntu.com/questions/1325811/unable-to-locate-package-when-the-file-is-right-in-the-directory-its-a-d|AskUbuntu "Unable to locate package — when the /file/ is right in the directory (it's a .deb) [duplicate]"]]. *[[http://www.linuxfordevices.com/tutorials/ubuntu/fix-unable-to-locate-package|LinuxForDevices "How to fix 'Unable To Locate Package'? – (Fix with APT Sources)"]] === General Resources === *[[http://www.debian.org/mirror/list|Debian.org Manual Deutsch "Debian worldwide mirror sites"]]. *[[ftp://ftp2.de.debian.org/debian/|ftp2.de.debian.org/debian/]]. *[[ftp://ftp.de.debian.org/debian/|ftp.de.debian.org/debian/]]. *[[http://deb.debian.org/|deb.Debian.org]] - Be aware! :-( I added these 3 lines "/etc/apt/sources.list", but my system was ruined, and I had to reinstall the system with formatting the filesystem -:( : deb http://deb.debian.org/debian unstable main deb http://deb.debian.org/debian-debug unstable-debug main deb http://deb.debian.org/debian-ports unstable main *[[http://www.debian.org/doc/manuals/debian-reference/ch02.de.html|Debian.org Manual Deutsch "Kapitel 2. Debian-Paketmanagement"]]. *[[http://www.debian.org/doc/manuals/debian-faq/pkgtools.de.html|Debian.org Manual Deutsch "Kapitel 8. Die Debian-Paketverwaltungswerkzeuge"]]. *[[http://wiki.debian.org/PackageManagement|Debian Wiki "PackageManagement"]]. *[[http://wiki.debian.org/PackageManagementTools|Debian Wiki "PackageManagementTools"]]. *[[http://www.debian.org/doc/manuals/debian-faq/uptodate.en.html|Debian Manuals "Chapter 9. Keeping your Debian system up-to-date"]] - "aptitude is the recommended package manager for Debian GNU/Linux systems". *[[http://www.debian.org/doc/manuals/debian-faq/pkgtools.en.html#aptitude|Debian Manuals "Chapter 8. The Debian package management tools"]]. -"8.1.1. dpkg". -"8.1.2. APT". -"8.1.3. aptitude". -"8.1.4. synaptic". -"8.1.5. tasksel". -"8.1.6.1. dpkg-deb". ===== Desktop ===== ==== Maximize and unmaximize a Window ==== *[[http://help.ubuntu.com/stable/ubuntu-help/shell-windows-maximize.html.en|Ubuntu documentation "Maximize and unmaximize a window"]] - Valid infos for both Debian Linux with GNOME desktop & Ubuntu Linux. *There is no button in the application window at the Debian desktop, in opposite to Windows desktop. *However, there are function keys to maximize a window, and to return to the individual window size: *With "Super" key = "Windows key" on modern PC keyboards: *"Windows-Key + Cursur-Up" - Maximize window to desktop size. "Windows-Key + Cursur-Down" - Unmaximize window. *"ALT + F10" to toggle between maximized window size and unmaximized window size. ==== Trash ==== *[[http://www.askubuntu.com/questions/282332/what-is-the-trash-1000-folder-and-how-to-delete-it|Ask Ubuntu "What is the '.Trash-1000' folder and how to delete it?"]] - "This is the folder of you paperbin". ===== Applications ===== ==== Application: Executing Graphical Applications like "gedit" fail, as root in "su -" mode ==== *I may start graphical applications like "geedit", while beeing "su". *If I try to start graphical applications like "geedit", while beeing "su -", the program execution is rejected by the error message: Gtk-WARNING **: 07:53:29.111: cannot open dsisplay: === Resources === *[[http://unix.stackexchange.com/questions/118811/why-cant-i-run-gui-apps-from-root-no-protocol-specified|StackExchange "Why can't I run GUI apps from 'root': 'No protocol specified'?"]] - ???"'xhost +' fixed my problem"??? :-). ==== Application: gedit ==== *[[http://www.gedit-text-editor.org/|gedit, a text editor]]. apt-get install gedit *Setting the default Text Editor doesn't display "gedit" after Installation ( [[http://unix.stackexchange.com/questions/42726/how-do-i-change-the-default-text-editor-in-the-debian-squeeze-distro|StackExchange "How do I change the default text editor in the Debian (squeeze) distro"]] ): sudo update-alternatives --config editor ==== Application: Lua 5.3 ==== *Lua is shipped on the data DVDs #2 & #3 of Debian Linux 10.7 ( so not on the bootable DVD #1 ) :-). ==== Application: Calculator ==== *[[http://www.reddit.com/r/debian/comments/1j7ci2o/how_stable_debian_really_is_calculator_is_not/|reddit "r/debian" - "How stable Debian really is? `Calculator" is not responding` seems to be such a basic problem for a distro praised for its stability"]], 2025-03. *[[http://www.reddit.com/r/debian/comments/1itbfkw/gnome_calculator_broken_by_recent_libgnutls/|reddit "r/debian" - "Gnome Calculator broken by recent libgnutls security update? "]]. *Fix, works fine for "default user" dconf write /org/gnome/calculator/refresh-interval 0 *For "root" ( "su" or "su -" ), the fix causes an errror message: error: Cannot autolaunch D-Bus without X11 $DISPLAY ==== Application: Visual Studio Code ==== *[[http://code.visualstudio.com/docs/setup/linux|Visual Studio Code "Visual Studio Code on Linux"]]. *I passed the installation successfully, by using the "GDebi Package Installer" :-). ===== Bootloader "GRUB" ===== ==== Configuration ==== *In my GRUB, the boot order is: -Debian GNU/Linux. -Advanced options for Debian GNU/Linux. -Windows Boot Manager ( on /dev/sb1 ). -UEFI Firmware Settings. *Set the "Windows boot Manager" as default. Set the Timeout from 5 to 30 seconds, at "/etc/default/grub": # GRUB_DEFAULT=0 GRUB_DEFAULT=2 #GRUB_TIMEOUT=5 GRUB_TIMEOUT=30 #GRUB_TERMINAL=console GRUB_TERMINAL=console *Update the GRUB configuration by sudo update-grub ==== Reinstallation by Debian Live CD / DVD / USB-Stick ==== *[[https://wiki.debian.org/GrubEFIReinstall|Debian Wiki "GrubEFIReinstall"]] - "Starting with Windows 8 most Desktop PC have EFI as firmware instead of the legacy BIOS. If your EFI based PC is not booting Debian, here are some ways to reinstall grub-efi, the bootloader used by Debian on these PCs". ==== Resources ==== *If you are in GRUB and so select a boot menu entry, you may press "e" to "edit" the boot menu script. For UEFI boot loaders, like "Windows Boot Manager (on /dev/sdb1)", it names the path of the UEFI boot loader: /EFI/Microsoft/Boot/bootmgfw.efi *[[http://askubuntu.com/questions/148095/how-do-i-set-the-grub-timeout-and-the-grub-default-boot-entry|askUBUNTU "How do I set the grub timeout and the grub default boot entry?"]]. *[[http://askubuntu.com/questions/52963/how-do-i-set-windows-to-boot-as-the-default-in-the-boot-loader/52990#52990|askUbuntu "How do I set Windows to boot as the default in the boot loader?"]]. *[[http://www.reddit.com/r/debian/comments/1hwv2h3/grub_boot_order/|reddit "r/debian" - "grub boot order"]]. *[[http://askubuntu.com/questions/136070/is-it-possible-to-completely-disable-grub-timeout|askUBUNTU "Is it possible to completely disable Grub timeout?"]] - "Edit /etc/default/grub (with root privileges), **change GRUB_TIMEOUT value from 10 to -1**". *[[http://askubuntu.com/questions/92276/how-do-i-boot-into-true-text-mode|askUBUNTU "How do I boot into true text mode?"]]. *[[http://superuser.com/questions/462092/grub-in-text-only-mode|StackOverflow "GRUB in text-only mode?"]]. ===== Rescue Systems, System Rescue, System Recovery ===== ==== Steps to rescue a Linux system, which does not start in GUI ==== ==== Resources ==== *[[http://wiki.debian.org/SystemRescue|Debian Wiki "SystemRescue"]]. *[[http://wiki.debian.org/RescueLive|Debian Wiki "RescueLive"]]. *[[http://www.debian.org/CD/live/|Debian "Live install images"]]. {{tag>linux debian}}