Install Linux On PCs & Laptops - Android Method

  Рет қаралды 1,776

Ruth Ake

Ruth Ake

Күн бұрын

Пікірлер: 7
@ruthake
@ruthake 4 күн бұрын
UPDATED (09/17/2024) This comment has 2 parts, read the 2nd comment for the rest of the instructions. =================================== LINUX INSTALL OVERVIEW =================================== Whatever system you do have will NOT be affected during this install process. In other words, you will always have a working system during this whole procedure. 1. Download live ISO image 2. Create Debian Live USB Stick with the ISO file and a USB stick 3. Change boot order to boot from USB 1st 4. Use Debian Live USB Stick to install Debian on an SD card 5. Fixes and configurations ----------------------------------- Hardware Required: - USB stick (minimum of 8 GB) - SD or microSD card (I recommend 128 GB, but it can be smaller or larger) - USB to SD or USB to microSD card adapter ----------------------------------- Linux can be run from an SD card indefinitely, and you never have to run Linux on a hard drive/SSD if you don't want to. Installing Linux onto an SD card first is a good practice because it allows us to try/test Debian Linux before committing to it, work out any fixes, and also ensures that you always have a working system during the whole install process. This also makes installing Linux on a hard drive/SSD easier. Later on I will also show how to use the Debian Live USB Stick as a portable system as well as a backup/recovery system! =================================== 1. DOWNLOAD ISO IMAGE =================================== If EtchDroid app IS available for your device from the Play Store (play.google.com/store/apps/details?id=eu.depau.etchdroid ): Install the ISO Image from the Android side. If EtchDroid app is NOT available from the Play Store: Install the ISO image from the UserLAnd Linux side. If you're not familiar with UserLAnd Linux, then watch my Linux on Android Without Rooting Playlist: kzbin.info/aero/PLuCbba_UxUz4ipj-EzXKzZPNGZWwi0rXk ----------------------------------- Current Debian Live ISO (if current version fails to install Linux, try a previous version. Ex. debian-live-12.2.0-amd64-lxde.iso): Scroll down to the list of live images and click the debian-live file ending in lxde.iso (the download is about 3 GB). Other desktops are available from this list. My videos will focus on the LXDE desktop: cdimage.debian.org/debian-cd/current-live/amd64/iso-hybrid/ The live ISO allows us to try Debian Linux before installing, and it also gives us a more streamlined install procedure. ----------------------------------- Version Debian 12.2.0: cdimage.debian.org/mirror/cdimage/archive/12.2.0-live/amd64/iso-hybrid/ Scroll down to the list of live images and click debian-live-12.2.0-amd64-lxde.iso (the download is about 3 GB). Background: The version Debian 12.6.0 (debian-live-12.6.0-amd64-lxde.iso), will fail to install Linux. The error message is: "Command /usr/sbin/bootloader-config failed to finish in 600 seconds. There was no output from the command." Bug report (Same issue, different desktop, different day): lists.debian.org/debian-boot/2023/06/msg00074.html How does this make it through Debian/Calamares quality assurance and into publication? Only Debian knows for sure. Good news! Debian uses a best practice of archiving earlier versions which are readily available from their website: cdimage.debian.org/mirror/cdimage/archive/ =================================== 2. CREATE DEBIAN LIVE USB STICK =================================== EtchDroid Method: Install EtchDroid App: play.google.com/store/apps/details?id=eu.depau.etchdroid Enable EtchDroid app notifications if not already enabled: Android Settings > Apps > See all apps > EtchDroid > Notifications > enable All EtchDroid notifications Plug USB stick into Android device. From the EtchDroid App: Select Write raw image or ISO. Select .iso file. Select USB stick. Click OK button to allow EtchDroid to access USB stick. Click circle button in the bottom right. Click FLASH IMAGE button. Monitor progress through notifications. ----------------------------------- Generic Method: Plug USB stick into Android device Format USB Stick as FAT32: Android Settings > Storage > click the This device pull-down and select the USB stick Click 3 dot menu button from the top right and select Format. Click Format button, and click the Format button again to confirm. Click Done button when done. Folders autogenerated on USB stick can be ignored. From Linux inside the UserLAnd app, open a terminal and extract the files from the .iso file and place them in the Downloads folder (watch Linux on Android Without Rooting! Playlist if you are unfamiliar with the UserLAnd app: kzbin.info/aero/PLuCbba_UxUz4ipj-EzXKzZPNGZWwi0rXk ): 7z x -o/Downloads/HOLD From Files app on the Android side, copy ALL the extracted files to the USB Stick: Internal storage > Download > HOLD Copy everything inside HOLD folder to the USB stick (Copy folders individually if an error occurs). Fix file '/boot/grub/splash.png not found' From the USB files, copy splash images from /isolinux to the /boot/grub =================================== 3. CHANGE BOOT ORDER =================================== When booting, "Boot Menu" allows us to temporarily change the boot order for the current boot, to boot from USB first. "Setup" allows us to permanently change the boot order to boot from USB first (I STRONGLY recommend taking a picture with a phone before permanently changing the boot order). To choose what to boot from or access the boot order, key(s) need to be pressed before the computer completely starts up. The key(s) and screens for choosing what to boot from and changing the boot order will vary for every system. Common places the key(s) can be found are: - Screen that pops up before the computer completely boots up - Written somewhere on the computer - Search online for " boot order" At the GRUB menu, press Enter to start Debian Linux, the first item should already be selected (Live system (amd64)). Live versions will not start as fast, be patient. =================================== 4. INSTALL DEBIAN ONTO AN SD CARD =================================== Disable Screensaver (prevents install interference): Menu > Preferences > XScreenSaver Settings Mode pull-down > select Disable Screen Saver Plug in the SD Card, click OK button for any window that pops up and close any file manager windows. Install Linux onto the SD card: Double click Install Debian icon on the Desktop. Select language > click Next button Location: Select Region & Zone > click Next button Keyboard: Select Keyboard layout > click Next button Partitions: Click the Select storage device pull-down and select the SD card. Make sure the SD card is selected or else the install will wipe out your main system! Select Manual partitioning > click Next button Click New Partition Table button > select GUID Partition Table (GPT) > click OK button Select Free Space > click Create button > set the following: Size: 500 MiB File System: fat32 Mount Point: /boot/efi FS Label: boot Flags: check the boot flag Click the OK button. Select Free Space > click Create button > set the following: Size: No change (leave the rest of the space to this partition) File System: ext4 Mount Point: / FS Label: main Flags: don't check any flags Click the OK button Click the Next button. Users: Set desired names and password. Check the box to Log in automatically without asking for the password. Click the Next button. Summary: Last chance to check that Linux is being installed on the SD card and NOT the main system. When ready, click the Install button. When the install is done, uncheck the Restart now box and click the Done button. =================================== 5. FIXES & CONFIGURATIONS =================================== Prevent SD card wear and tear: - No swap partition (already done during install setup) - Send tmp & log files to RAM - Disable journaling ----------------------------------- Send tmp and log files to RAM (prevents SD card wear and tear): Unplug the SD card from the computer. Plug the SD card back into the computer. Click the OK button for the window that pops up and close any file manager windows. Menu > select Run > execute sudo pcmanfm to open the file manager with root. From the file manager window, go to /media/user/main/etc Right click fstab file and open it with Mousepad. File menu > select Save As > save the copy as fstab.bak Close Mousepad. Open original fstab file with Mousepad again, and add the following lines: tmpfs /var/log tmpfs defaults,noatime 0 0 tmpfs /var/tmp tmpfs defaults,noatime 0 0 tmpfs /tmp tmpfs defaults,noatime 0 0 File menu > select Save > close Mousepad ----------------------------------- Further instructions are in the 2nd comment.
@ruthake
@ruthake 4 күн бұрын
Disable journaling (prevents SD card wear and tear): Open a terminal from Menu > System Tools > LXTerminal (Ctrl+Shift++, Ctrl+Shift+- to temporarily adjust text size). Switch to root user: sudo su List mounted file systems: df -h /dev/sdb2 is an example. The SD card will be the last device plugged in so the Filesystem will be /dev/sd2 and it will be Mounted on /media/user/main umount /dev/sdb2 List file system features: debugfs -R features /dev/sdb2 Disable journaling (no ^ would enable journaling): tune2fs -O ^has_journal /dev/sdb2 ----------------------------------- Fix SD Card Not Booting Up: Connect to the internet (Menu > Preferences > Connman Settings > click the icon that pops up in the bottom right of the taskbar): - Wired (Ethernet or USB Tethering from an Android device. See video for USB Tethering 28:58) - Wireless if available (WiFi or WiFi Dongle) Open a terminal from Menu > System Tools > LXTerminal (Ctrl+Shift++, Ctrl+Shift+- to temporarily adjust text size): sudo apt update -y sudo apt install gparted -y Open GParted from Menu > System Tools > GParted: Click pull-down from top right and select the SD Card. SD card will have fat32 and ext4 partitions we made when we installed Linux earlier. Right click fat32 partition > select Manage Flags Uncheck boot flag (msftdata flag will be automatically checked) Click Close button and close GParted. Unplug SD card. Plug SD card back in. Click OK button for any window that pops up. From the window that only has the EFI folder (/media/user/BOOT/EFI): Copy ALL files from /EFI/Debian to /EFI/boot Rename /EFI/boot/grubx64.efi to /EFI/boot/BOOTx64.efi From /EFI/Debian copy grubx64.efi to /EFI/boot Close out of the file manager. Open GParted from Menu > System Tools > GParted: Click pull-down from top right and select the SD card. Right click fat32 partition > select Manage Flags Check boot flag (esp flag will also automatically be checked) Click Close button and close GParted. Shut down Linux from Menu > Logout > Shutdown Unplug Debian Live USB Stick, leave the SD card plugged in, and turn the computer back on to start up Linux from the SD card! ----------------------------------- Update (This fixes issues with things not working such as there being no Wireless option): Connect to the internet (Menu > Preferences > Connman Settings > click the icon that pops up in the bottom right of the taskbar): Wired (Ethernet or USB Tethering from an Android device. See video for USB Tethering 28:58) Wireless if available (WiFi or WiFi Dongle) Open a terminal from Menu > System Tools > LXTerminal (Ctrl+Shift++, Ctrl+Shift+- to temporarily adjust text size): Update software index list (Enter in the password that was set during the install. The password will not be visible while typing. After typing in the password, press Enter to execute the command. For forgotten password, see below.): sudo apt update -y Upgrade already installed packages: sudo apt dist-upgrade -y Reboot Linux from Menu > Logout > Reboot Check to see if everything is working properly. If something is still not working properly, try updating the kernel: Connect to the internet. Open a terminal from Menu > System Tools > LXTerminal: Check current kernel version in use: uname -r List available kernel updates: apt-cache search linux-image | grep "PCs (signed)" Update to latest kernel version, for example: sudo apt install linux-image-6.9.7+bpo-amd64 Reboot Linux from Menu > Logout > Reboot Check to see if everything is working properly. ----------------------------------- Configure Resolution: Generally, it is best to adjust app resolution as opposed to the display resolution which can also be changed from: Menu > Preferences > Monitor Settings ----------------------------------- Configure Audio (this also fixes no sound or loss of sound when switching an app to fullscreen): Menu > Sound & Video > PulseAudio Volume Control Go to the Configuration tab. Click the Profile pull-down and select a Profile. You can try out each option until one works. If switching an app to fullscreen results in a loss of audio: Take the app out of fullscreen. Close the app. Open a terminal from Menu > System Tools > LXTerminal Reset PulseAudio: systemctl --user restart pulseaudio Select a different sound Profile from Menu > Sound & Video > PulseAudio Volume Control: Go to the Configuration tab. Click the Profile pull-down and select a Profile. To quickly test sound, open a terminal from Menu > System Tools > LXTerminal: sudo apt install alsa-utils -y speaker-test =================================== PASSWORD WORKAROUND =================================== At the GRUB menu, press the Down arrow key and then the Up arrow key to prevent the system from booting up. Press E to edit the startup configuration. At the end of the line that starts with linux, add the following: init=/bin/bash Ctrl+X From the terminal: Press Enter mount -o remount,rw / passwd Enter in the new password. umount / Alt+Ctrl+Del
@dallascuba972
@dallascuba972 4 күн бұрын
thanks for the video
@gigioh981
@gigioh981 3 күн бұрын
Lovely video =) Quick question out of curiosity: I see that some copying and renaming are necessary in order to boot from the SD card. Is this a Debian thing only or a workaround for all the GNU/Linux systems to boot on SD cards? In my case, I installed a system on a SD card with my laptop reader. My BIOS won't use my internal reader to boot anything, so either I use the external USB card reader (as in this vid's case I guess) or I do these three steps: - I can install the system on the SD card (yep, I even went crazy once and used f2fs with compression, which worked but I don't recommend for a number of reasons, or Btrfs with compression) - I need to use a separate /boot partition on an internal SSD disk - " " a separate /boot/efi partition, again on an internal SSD disk ...unless, maybe, the copying and renaming of the boot files will allow me to use only a separate /boot/efi partition instead of a /boot and a /boot/efi? 🤔
@ruthake
@ruthake 3 күн бұрын
Just the wrong combination of hardware, SD card reader, SD card, and software can result in an unbootable system, this is usually resolved by using a new card reader. This is most often encountered with new SD cards, and is usually resolved with a new card reader. My internal SD card reader on my Intel NUC will not boot new SD cards. I resolved this by using a new Kingston SD card reader (I cannot guarantee that this will resolve your issue): www.amazon.com/dp/B085P5FDXQ/ Debian will always require a separate /boot/efi partition in a FAT32 formatted partition.
@dallascuba972
@dallascuba972 4 күн бұрын
thanks forthe video
The Linux Experience
31:00
Bog
Рет қаралды 984 М.
I switched to Linux 30 days ago... How did it go?
28:46
Craft Computing
Рет қаралды 249 М.
Секрет фокусника! #shorts
00:15
Роман Magic
Рет қаралды 110 МЛН
Bike Vs Tricycle Fast Challenge
00:43
Russo
Рет қаралды 12 МЛН
Automate EVERYTHING in Linux
1:38:16
Titus Tech Talk
Рет қаралды 12 М.
Why is Everyone Buying This Controller?
14:15
Linus Tech Tips
Рет қаралды 454 М.
Pixtral is REALLY Good - Open-Source Vision Model
11:15
Matthew Berman
Рет қаралды 14 М.
Run ALL Your AI Locally in Minutes (LLMs, RAG, and more)
20:19
Cole Medin
Рет қаралды 19 М.
Simple Code, High Performance
2:50:14
Molly Rocket
Рет қаралды 250 М.
Switching to Linux: A Beginner’s Guide
20:22
ExplainingComputers
Рет қаралды 82 М.
Linux is a MAJOR Rabbit Hole
36:40
TechHut
Рет қаралды 664 М.
Linux from Scratch
2:35:42
Titus Tech Talk
Рет қаралды 173 М.
Linux Mint 22 - Cinnamon - New User Tips.
45:06
Linux for Seniors
Рет қаралды 17 М.
Секрет фокусника! #shorts
00:15
Роман Magic
Рет қаралды 110 МЛН