There is an example to install debian from a Linux-mint live USB (or any debian based distro). If you have a debian based distribution already installed on your hdd , you can install other debian based distro using chroot
and debootstrap
from the existing OS.
Boot from the live USB .Use gparted to create your root
, swap
,/home
... partitions.
If you prefer the command line ( fdisk
, parted ..) , there is how to activate the swap partition :
mkswap /dev/sdaY
sync
swapon /dev/sdaY
Let's say you need to install debian stretch .
Install the debootstrap
package :
sudo apt-get install debootstrap
Create the /mnt/stable
then mount your root partition (sdaX
)
sudo mkdir /mnt/stable
sudo mount /dev/sdaX /mnt/stable
Install the base system:
sudo debootstrap --arch amd64 stretch /mnt/stable http://ftp.fr.debian.org/debian
sudo mount -t proc none /mnt/stable/proc
sudo mount -o bind /dev /mnt/stable/dev
sudo chroot /mnt/stable /bin/bash
Set up your root password:
passwd
Add a new user:
adduser your-username
Set up the hostname :
echo your_hostname > /etc/hostname
Configure the /etc/fstab
:
add the following lines:
/dev/sdaX / ext4 defaults 0 1
/dev/sdaY none swap sw 0 0
proc /proc proc defaults 0 0
use the debian documentation to edit your sources.list
(replace jessie
by stretch
)
Configure locale :
apt-get install locales
dpkg-reconfigure locales
Configure you keyboard:
apt-get install console-data
dpkg-reconfigure console-data
Install the kernel:
apt-cache search linux-image
Then:
apt-get install linux-image-4.9.0-3-amd64
Configure the network:
editor /etc/network/interfaces
and past the following:
auto lo
iface lo inet loopback
allow-hotplug eth0 # replace eth0 with your interface
iface eth0 inet dhcp
allow-hotplug wlan0 # replace wlan0 with your interface
iface wlan0 inet dhcp
To manage the wifi network install the following packages:
apt-get install net-tools network-manager wireless-tools
Install grub :
apt-get install grub2
grub-install /dev/sda
update-grub
You can install a desktop environment through the command tasksel
:
apt-get install aptitude tasksel
Run the following command and install your favorite GUI:
tasksel
Finally exit the chroot and reboot your system
Documentation: D.3. Installing Debian GNU/Linux from a Unix/Linux System
Debian wiki:
...so my question is more "what moves have been made so far towards this vision?"
That "vision" was alive and well about seven or eight years ago, and things were looking good. Back then I was able to install Debian on my old Samsung Galaxy Nexus.
Unfortunately, ever since then things have been doing in a terribly wrong direction: manufacturers started making more and more phones that are locked in ways that can't even be unlocked. Nowadays you can't even buy (at least here in the US) a phone that can be rooted, and believe me, I've tried. Honestly, I have no idea how they get away with that -- you pay good money to own that little machine, and yet, you can't have full control of it? I am hoping that at some point this will all boil over into lawsuites, like we had in the past, when some manufacturers tried to lock down personal computers. (Not much hope though, as the years go by, and people seem to care less and less.)
Best Answer
postmarketOS, is a distribution based on Alpine Linux for phones,
https://postmarketos.org
The project is currently in alpha, but it can already boot and run on many devices.