Are there commands to install Ubuntu from USB? [closed]
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
I currently have Q4os installed.
What command can I use to install Lubuntu from files on USB? I can't boot install from USB and mini install doesn't have wireless internet installed.
command-line system-installation usb chroot debootstrap
closed as off-topic by dessert, Fabby, anonymous2, waltinator, dpb Apr 27 at 4:48
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." â dessert, Fabby, anonymous2, waltinator
add a comment |Â
up vote
0
down vote
favorite
I currently have Q4os installed.
What command can I use to install Lubuntu from files on USB? I can't boot install from USB and mini install doesn't have wireless internet installed.
command-line system-installation usb chroot debootstrap
closed as off-topic by dessert, Fabby, anonymous2, waltinator, dpb Apr 27 at 4:48
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." â dessert, Fabby, anonymous2, waltinator
Q4OS is Debian based, it might support mkusb which is a great tool for making an installer USB.
â C.S.Cameron
Apr 21 at 22:45
This is not a duplicate of either of the questions it's marked as duplicate of in my opinion. The question is how to install Ubuntu from within q4OS as I read it.
â vidarlo
Apr 22 at 15:42
@vidarlo I would consider that off topic. We can't be expected to know how Q4OS works.
â Rinzwind
Apr 22 at 17:41
1
@Rinzwind Off topic would be a valid close reason... But the dupes was not a valid close reason.
â vidarlo
Apr 22 at 18:05
Why can't you "boot install from USB"? Add this detail to your question, and I'm sure someone would be happy to help.
â dpb
Apr 27 at 4:47
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I currently have Q4os installed.
What command can I use to install Lubuntu from files on USB? I can't boot install from USB and mini install doesn't have wireless internet installed.
command-line system-installation usb chroot debootstrap
I currently have Q4os installed.
What command can I use to install Lubuntu from files on USB? I can't boot install from USB and mini install doesn't have wireless internet installed.
command-line system-installation usb chroot debootstrap
edited Apr 22 at 17:36
![](https://i.stack.imgur.com/8CW8e.png?s=32&g=1)
![](https://i.stack.imgur.com/8CW8e.png?s=32&g=1)
Zanna
48k13119227
48k13119227
asked Apr 21 at 21:39
user819417
62
62
closed as off-topic by dessert, Fabby, anonymous2, waltinator, dpb Apr 27 at 4:48
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." â dessert, Fabby, anonymous2, waltinator
closed as off-topic by dessert, Fabby, anonymous2, waltinator, dpb Apr 27 at 4:48
This question appears to be off-topic. The users who voted to close gave this specific reason:
- "This is not about Ubuntu. Questions about other Linux distributions can be asked on Unix & Linux, those about Windows on Super User, those about Apple products on Ask Different and generic programming questions on Stack Overflow." â dessert, Fabby, anonymous2, waltinator
Q4OS is Debian based, it might support mkusb which is a great tool for making an installer USB.
â C.S.Cameron
Apr 21 at 22:45
This is not a duplicate of either of the questions it's marked as duplicate of in my opinion. The question is how to install Ubuntu from within q4OS as I read it.
â vidarlo
Apr 22 at 15:42
@vidarlo I would consider that off topic. We can't be expected to know how Q4OS works.
â Rinzwind
Apr 22 at 17:41
1
@Rinzwind Off topic would be a valid close reason... But the dupes was not a valid close reason.
â vidarlo
Apr 22 at 18:05
Why can't you "boot install from USB"? Add this detail to your question, and I'm sure someone would be happy to help.
â dpb
Apr 27 at 4:47
add a comment |Â
Q4OS is Debian based, it might support mkusb which is a great tool for making an installer USB.
â C.S.Cameron
Apr 21 at 22:45
This is not a duplicate of either of the questions it's marked as duplicate of in my opinion. The question is how to install Ubuntu from within q4OS as I read it.
â vidarlo
Apr 22 at 15:42
@vidarlo I would consider that off topic. We can't be expected to know how Q4OS works.
â Rinzwind
Apr 22 at 17:41
1
@Rinzwind Off topic would be a valid close reason... But the dupes was not a valid close reason.
â vidarlo
Apr 22 at 18:05
Why can't you "boot install from USB"? Add this detail to your question, and I'm sure someone would be happy to help.
â dpb
Apr 27 at 4:47
Q4OS is Debian based, it might support mkusb which is a great tool for making an installer USB.
â C.S.Cameron
Apr 21 at 22:45
Q4OS is Debian based, it might support mkusb which is a great tool for making an installer USB.
â C.S.Cameron
Apr 21 at 22:45
This is not a duplicate of either of the questions it's marked as duplicate of in my opinion. The question is how to install Ubuntu from within q4OS as I read it.
â vidarlo
Apr 22 at 15:42
This is not a duplicate of either of the questions it's marked as duplicate of in my opinion. The question is how to install Ubuntu from within q4OS as I read it.
â vidarlo
Apr 22 at 15:42
@vidarlo I would consider that off topic. We can't be expected to know how Q4OS works.
â Rinzwind
Apr 22 at 17:41
@vidarlo I would consider that off topic. We can't be expected to know how Q4OS works.
â Rinzwind
Apr 22 at 17:41
1
1
@Rinzwind Off topic would be a valid close reason... But the dupes was not a valid close reason.
â vidarlo
Apr 22 at 18:05
@Rinzwind Off topic would be a valid close reason... But the dupes was not a valid close reason.
â vidarlo
Apr 22 at 18:05
Why can't you "boot install from USB"? Add this detail to your question, and I'm sure someone would be happy to help.
â dpb
Apr 27 at 4:47
Why can't you "boot install from USB"? Add this detail to your question, and I'm sure someone would be happy to help.
â dpb
Apr 27 at 4:47
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
3
down vote
You may, using debootstrap
. This is not for the faint of heart, as it is mostly a manual procedure, but it's absolutely possible.
First you will have to make space. Shrink one of the existing partitions, so you have at least a gigabyte or three for Ubuntu. This can be increased later, when you have booted into Ubuntu, and are ready to remove your current OS. gparted
is a nice GUI tool for working with partitions.
Next, mount your new partition somewhere nice. I will use /mnt
for this in this text.
Also run the following command, and save the UUID for later! Substitute sdb1 for whatever partition you set up.
$ sudo blkid /dev/sdb1
/dev/sdb1: LABEL="ubuntu" UUID="a15e52e5-a5e3-4643-a657-43ce87f9aa00" TYPE="ext4"
Getting debootstrap
At this stage I assumed /mnt/
is mounted.
First step is to download debootstrap. At the time of writing, debootstrap_1.0.95.tar.gz is the latest version:
[/tmp]$ wget "http://ports.ubuntu.com/ubuntu-ports/pool/main/d/debootstrap/debootstrap_1.0.95.tar.gz"
[/tmp]$ tar zxf debootstrap_1.0.95.tar.gz
[/tmp]$ cd debootstrap-1.0.95/
[/tmp/debootstrap-1.0.95]$ export DEBOOTSTRAP_DIR=`pwd`
[/tmp/debootstrap-1.0.95]$ sudo DEBOOTSTRAP_DIR=`pwd` ./debootstrap --arch=amd64 xenial /mnt http://archive.ubuntu.com/ubuntu
[removed lots of output of debootstrap fetching packages]
This step takes some time, as the base system is downloaded and unpacked into /mnt
. It should end with I: Base system installed successfully.
Then we need to bind mount some system directories, so information about the machine is available inside the chroot:
# sudo mount -o bind /dev /mnt/dev
# sudo mount -o bind /dev/pts /mnt/dev/pts
# sudo mount -t sysfs /sys /mnt/sys
# sudo mount -t proc /proc /mnt/proc
chroot into the new system
[/tmp/debootstrap-1.0.95]$ sudo chroot /mnt
root@hannah:/#
This is a functioning Ubuntu system, albeit a minimal one.
First step is probably to install a few packages, such as nano.
You will get error messages complaining that devices are unavailable and so forth. This is normal. Ignore them.
All commands from now on is run inside the chroot environment.
Mount the virtual /proc and /sys fs:
# mount -t proc proc /proc
# mount -t sysfs sysfs /sys
Configure fstab
The fstab
is blank. Edit it with nano:
# nano /etc/fstab
Add a line like
UUID=a15e52e5-a5e3-4643-a657-43ce87f9aa00 / ext4 errors=remount-ro 0 1
where the UUID is the one you saved above.
Update your system
# echo "deb http://security.ubuntu.com/ubuntu xenial-security main" > /etc/apt/sources.list
# echo "deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse" >> /etc/apt/sources.list
# echo "deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse" >> /etc/apt/sources.list
# apt-get update && apt-get upgrade
Time to install a kernel!
# apt-cache search linux-image
will list available kernels. Pick a suitable one. For me this was linux-image-4.8.0-58-generic
, which was installed with
# apt-get install linux-image-4.8.0-58-generic
This should ask you where you want to install the bootloader. This is typically the main drive, /dev/sda
or similar. This will overwrite your current bootloader and make your current system unbootable!
Adding a user
# adduser foo
##Answer adduser with password, name and so on
# usermod -aG sudo username
The last command will add sudo permissions for the user.
Misc things to configure
You probably want to configure those items.
Timezone:
# dpkg-reconfigure tzdata
Locales:
# dpkg-reconfigure locales
Install lubuntu-desktop
# apt-get lubuntu-desktop
This will install the meta-package lubuntu-desktop which depends on all you need for a standard lubuntu desktop. This takes a little while, as it is many packages. This will probably fail, as blueman will refuse to work without a running, proper system. Ignore it, and remove it with apt-get remove blueman
.
This should be more or less it. Reboot into your new system, and log in.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
3
down vote
You may, using debootstrap
. This is not for the faint of heart, as it is mostly a manual procedure, but it's absolutely possible.
First you will have to make space. Shrink one of the existing partitions, so you have at least a gigabyte or three for Ubuntu. This can be increased later, when you have booted into Ubuntu, and are ready to remove your current OS. gparted
is a nice GUI tool for working with partitions.
Next, mount your new partition somewhere nice. I will use /mnt
for this in this text.
Also run the following command, and save the UUID for later! Substitute sdb1 for whatever partition you set up.
$ sudo blkid /dev/sdb1
/dev/sdb1: LABEL="ubuntu" UUID="a15e52e5-a5e3-4643-a657-43ce87f9aa00" TYPE="ext4"
Getting debootstrap
At this stage I assumed /mnt/
is mounted.
First step is to download debootstrap. At the time of writing, debootstrap_1.0.95.tar.gz is the latest version:
[/tmp]$ wget "http://ports.ubuntu.com/ubuntu-ports/pool/main/d/debootstrap/debootstrap_1.0.95.tar.gz"
[/tmp]$ tar zxf debootstrap_1.0.95.tar.gz
[/tmp]$ cd debootstrap-1.0.95/
[/tmp/debootstrap-1.0.95]$ export DEBOOTSTRAP_DIR=`pwd`
[/tmp/debootstrap-1.0.95]$ sudo DEBOOTSTRAP_DIR=`pwd` ./debootstrap --arch=amd64 xenial /mnt http://archive.ubuntu.com/ubuntu
[removed lots of output of debootstrap fetching packages]
This step takes some time, as the base system is downloaded and unpacked into /mnt
. It should end with I: Base system installed successfully.
Then we need to bind mount some system directories, so information about the machine is available inside the chroot:
# sudo mount -o bind /dev /mnt/dev
# sudo mount -o bind /dev/pts /mnt/dev/pts
# sudo mount -t sysfs /sys /mnt/sys
# sudo mount -t proc /proc /mnt/proc
chroot into the new system
[/tmp/debootstrap-1.0.95]$ sudo chroot /mnt
root@hannah:/#
This is a functioning Ubuntu system, albeit a minimal one.
First step is probably to install a few packages, such as nano.
You will get error messages complaining that devices are unavailable and so forth. This is normal. Ignore them.
All commands from now on is run inside the chroot environment.
Mount the virtual /proc and /sys fs:
# mount -t proc proc /proc
# mount -t sysfs sysfs /sys
Configure fstab
The fstab
is blank. Edit it with nano:
# nano /etc/fstab
Add a line like
UUID=a15e52e5-a5e3-4643-a657-43ce87f9aa00 / ext4 errors=remount-ro 0 1
where the UUID is the one you saved above.
Update your system
# echo "deb http://security.ubuntu.com/ubuntu xenial-security main" > /etc/apt/sources.list
# echo "deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse" >> /etc/apt/sources.list
# echo "deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse" >> /etc/apt/sources.list
# apt-get update && apt-get upgrade
Time to install a kernel!
# apt-cache search linux-image
will list available kernels. Pick a suitable one. For me this was linux-image-4.8.0-58-generic
, which was installed with
# apt-get install linux-image-4.8.0-58-generic
This should ask you where you want to install the bootloader. This is typically the main drive, /dev/sda
or similar. This will overwrite your current bootloader and make your current system unbootable!
Adding a user
# adduser foo
##Answer adduser with password, name and so on
# usermod -aG sudo username
The last command will add sudo permissions for the user.
Misc things to configure
You probably want to configure those items.
Timezone:
# dpkg-reconfigure tzdata
Locales:
# dpkg-reconfigure locales
Install lubuntu-desktop
# apt-get lubuntu-desktop
This will install the meta-package lubuntu-desktop which depends on all you need for a standard lubuntu desktop. This takes a little while, as it is many packages. This will probably fail, as blueman will refuse to work without a running, proper system. Ignore it, and remove it with apt-get remove blueman
.
This should be more or less it. Reboot into your new system, and log in.
add a comment |Â
up vote
3
down vote
You may, using debootstrap
. This is not for the faint of heart, as it is mostly a manual procedure, but it's absolutely possible.
First you will have to make space. Shrink one of the existing partitions, so you have at least a gigabyte or three for Ubuntu. This can be increased later, when you have booted into Ubuntu, and are ready to remove your current OS. gparted
is a nice GUI tool for working with partitions.
Next, mount your new partition somewhere nice. I will use /mnt
for this in this text.
Also run the following command, and save the UUID for later! Substitute sdb1 for whatever partition you set up.
$ sudo blkid /dev/sdb1
/dev/sdb1: LABEL="ubuntu" UUID="a15e52e5-a5e3-4643-a657-43ce87f9aa00" TYPE="ext4"
Getting debootstrap
At this stage I assumed /mnt/
is mounted.
First step is to download debootstrap. At the time of writing, debootstrap_1.0.95.tar.gz is the latest version:
[/tmp]$ wget "http://ports.ubuntu.com/ubuntu-ports/pool/main/d/debootstrap/debootstrap_1.0.95.tar.gz"
[/tmp]$ tar zxf debootstrap_1.0.95.tar.gz
[/tmp]$ cd debootstrap-1.0.95/
[/tmp/debootstrap-1.0.95]$ export DEBOOTSTRAP_DIR=`pwd`
[/tmp/debootstrap-1.0.95]$ sudo DEBOOTSTRAP_DIR=`pwd` ./debootstrap --arch=amd64 xenial /mnt http://archive.ubuntu.com/ubuntu
[removed lots of output of debootstrap fetching packages]
This step takes some time, as the base system is downloaded and unpacked into /mnt
. It should end with I: Base system installed successfully.
Then we need to bind mount some system directories, so information about the machine is available inside the chroot:
# sudo mount -o bind /dev /mnt/dev
# sudo mount -o bind /dev/pts /mnt/dev/pts
# sudo mount -t sysfs /sys /mnt/sys
# sudo mount -t proc /proc /mnt/proc
chroot into the new system
[/tmp/debootstrap-1.0.95]$ sudo chroot /mnt
root@hannah:/#
This is a functioning Ubuntu system, albeit a minimal one.
First step is probably to install a few packages, such as nano.
You will get error messages complaining that devices are unavailable and so forth. This is normal. Ignore them.
All commands from now on is run inside the chroot environment.
Mount the virtual /proc and /sys fs:
# mount -t proc proc /proc
# mount -t sysfs sysfs /sys
Configure fstab
The fstab
is blank. Edit it with nano:
# nano /etc/fstab
Add a line like
UUID=a15e52e5-a5e3-4643-a657-43ce87f9aa00 / ext4 errors=remount-ro 0 1
where the UUID is the one you saved above.
Update your system
# echo "deb http://security.ubuntu.com/ubuntu xenial-security main" > /etc/apt/sources.list
# echo "deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse" >> /etc/apt/sources.list
# echo "deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse" >> /etc/apt/sources.list
# apt-get update && apt-get upgrade
Time to install a kernel!
# apt-cache search linux-image
will list available kernels. Pick a suitable one. For me this was linux-image-4.8.0-58-generic
, which was installed with
# apt-get install linux-image-4.8.0-58-generic
This should ask you where you want to install the bootloader. This is typically the main drive, /dev/sda
or similar. This will overwrite your current bootloader and make your current system unbootable!
Adding a user
# adduser foo
##Answer adduser with password, name and so on
# usermod -aG sudo username
The last command will add sudo permissions for the user.
Misc things to configure
You probably want to configure those items.
Timezone:
# dpkg-reconfigure tzdata
Locales:
# dpkg-reconfigure locales
Install lubuntu-desktop
# apt-get lubuntu-desktop
This will install the meta-package lubuntu-desktop which depends on all you need for a standard lubuntu desktop. This takes a little while, as it is many packages. This will probably fail, as blueman will refuse to work without a running, proper system. Ignore it, and remove it with apt-get remove blueman
.
This should be more or less it. Reboot into your new system, and log in.
add a comment |Â
up vote
3
down vote
up vote
3
down vote
You may, using debootstrap
. This is not for the faint of heart, as it is mostly a manual procedure, but it's absolutely possible.
First you will have to make space. Shrink one of the existing partitions, so you have at least a gigabyte or three for Ubuntu. This can be increased later, when you have booted into Ubuntu, and are ready to remove your current OS. gparted
is a nice GUI tool for working with partitions.
Next, mount your new partition somewhere nice. I will use /mnt
for this in this text.
Also run the following command, and save the UUID for later! Substitute sdb1 for whatever partition you set up.
$ sudo blkid /dev/sdb1
/dev/sdb1: LABEL="ubuntu" UUID="a15e52e5-a5e3-4643-a657-43ce87f9aa00" TYPE="ext4"
Getting debootstrap
At this stage I assumed /mnt/
is mounted.
First step is to download debootstrap. At the time of writing, debootstrap_1.0.95.tar.gz is the latest version:
[/tmp]$ wget "http://ports.ubuntu.com/ubuntu-ports/pool/main/d/debootstrap/debootstrap_1.0.95.tar.gz"
[/tmp]$ tar zxf debootstrap_1.0.95.tar.gz
[/tmp]$ cd debootstrap-1.0.95/
[/tmp/debootstrap-1.0.95]$ export DEBOOTSTRAP_DIR=`pwd`
[/tmp/debootstrap-1.0.95]$ sudo DEBOOTSTRAP_DIR=`pwd` ./debootstrap --arch=amd64 xenial /mnt http://archive.ubuntu.com/ubuntu
[removed lots of output of debootstrap fetching packages]
This step takes some time, as the base system is downloaded and unpacked into /mnt
. It should end with I: Base system installed successfully.
Then we need to bind mount some system directories, so information about the machine is available inside the chroot:
# sudo mount -o bind /dev /mnt/dev
# sudo mount -o bind /dev/pts /mnt/dev/pts
# sudo mount -t sysfs /sys /mnt/sys
# sudo mount -t proc /proc /mnt/proc
chroot into the new system
[/tmp/debootstrap-1.0.95]$ sudo chroot /mnt
root@hannah:/#
This is a functioning Ubuntu system, albeit a minimal one.
First step is probably to install a few packages, such as nano.
You will get error messages complaining that devices are unavailable and so forth. This is normal. Ignore them.
All commands from now on is run inside the chroot environment.
Mount the virtual /proc and /sys fs:
# mount -t proc proc /proc
# mount -t sysfs sysfs /sys
Configure fstab
The fstab
is blank. Edit it with nano:
# nano /etc/fstab
Add a line like
UUID=a15e52e5-a5e3-4643-a657-43ce87f9aa00 / ext4 errors=remount-ro 0 1
where the UUID is the one you saved above.
Update your system
# echo "deb http://security.ubuntu.com/ubuntu xenial-security main" > /etc/apt/sources.list
# echo "deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse" >> /etc/apt/sources.list
# echo "deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse" >> /etc/apt/sources.list
# apt-get update && apt-get upgrade
Time to install a kernel!
# apt-cache search linux-image
will list available kernels. Pick a suitable one. For me this was linux-image-4.8.0-58-generic
, which was installed with
# apt-get install linux-image-4.8.0-58-generic
This should ask you where you want to install the bootloader. This is typically the main drive, /dev/sda
or similar. This will overwrite your current bootloader and make your current system unbootable!
Adding a user
# adduser foo
##Answer adduser with password, name and so on
# usermod -aG sudo username
The last command will add sudo permissions for the user.
Misc things to configure
You probably want to configure those items.
Timezone:
# dpkg-reconfigure tzdata
Locales:
# dpkg-reconfigure locales
Install lubuntu-desktop
# apt-get lubuntu-desktop
This will install the meta-package lubuntu-desktop which depends on all you need for a standard lubuntu desktop. This takes a little while, as it is many packages. This will probably fail, as blueman will refuse to work without a running, proper system. Ignore it, and remove it with apt-get remove blueman
.
This should be more or less it. Reboot into your new system, and log in.
You may, using debootstrap
. This is not for the faint of heart, as it is mostly a manual procedure, but it's absolutely possible.
First you will have to make space. Shrink one of the existing partitions, so you have at least a gigabyte or three for Ubuntu. This can be increased later, when you have booted into Ubuntu, and are ready to remove your current OS. gparted
is a nice GUI tool for working with partitions.
Next, mount your new partition somewhere nice. I will use /mnt
for this in this text.
Also run the following command, and save the UUID for later! Substitute sdb1 for whatever partition you set up.
$ sudo blkid /dev/sdb1
/dev/sdb1: LABEL="ubuntu" UUID="a15e52e5-a5e3-4643-a657-43ce87f9aa00" TYPE="ext4"
Getting debootstrap
At this stage I assumed /mnt/
is mounted.
First step is to download debootstrap. At the time of writing, debootstrap_1.0.95.tar.gz is the latest version:
[/tmp]$ wget "http://ports.ubuntu.com/ubuntu-ports/pool/main/d/debootstrap/debootstrap_1.0.95.tar.gz"
[/tmp]$ tar zxf debootstrap_1.0.95.tar.gz
[/tmp]$ cd debootstrap-1.0.95/
[/tmp/debootstrap-1.0.95]$ export DEBOOTSTRAP_DIR=`pwd`
[/tmp/debootstrap-1.0.95]$ sudo DEBOOTSTRAP_DIR=`pwd` ./debootstrap --arch=amd64 xenial /mnt http://archive.ubuntu.com/ubuntu
[removed lots of output of debootstrap fetching packages]
This step takes some time, as the base system is downloaded and unpacked into /mnt
. It should end with I: Base system installed successfully.
Then we need to bind mount some system directories, so information about the machine is available inside the chroot:
# sudo mount -o bind /dev /mnt/dev
# sudo mount -o bind /dev/pts /mnt/dev/pts
# sudo mount -t sysfs /sys /mnt/sys
# sudo mount -t proc /proc /mnt/proc
chroot into the new system
[/tmp/debootstrap-1.0.95]$ sudo chroot /mnt
root@hannah:/#
This is a functioning Ubuntu system, albeit a minimal one.
First step is probably to install a few packages, such as nano.
You will get error messages complaining that devices are unavailable and so forth. This is normal. Ignore them.
All commands from now on is run inside the chroot environment.
Mount the virtual /proc and /sys fs:
# mount -t proc proc /proc
# mount -t sysfs sysfs /sys
Configure fstab
The fstab
is blank. Edit it with nano:
# nano /etc/fstab
Add a line like
UUID=a15e52e5-a5e3-4643-a657-43ce87f9aa00 / ext4 errors=remount-ro 0 1
where the UUID is the one you saved above.
Update your system
# echo "deb http://security.ubuntu.com/ubuntu xenial-security main" > /etc/apt/sources.list
# echo "deb http://archive.ubuntu.com/ubuntu/ xenial-backports main restricted universe multiverse" >> /etc/apt/sources.list
# echo "deb http://archive.ubuntu.com/ubuntu/ xenial main restricted universe multiverse" >> /etc/apt/sources.list
# apt-get update && apt-get upgrade
Time to install a kernel!
# apt-cache search linux-image
will list available kernels. Pick a suitable one. For me this was linux-image-4.8.0-58-generic
, which was installed with
# apt-get install linux-image-4.8.0-58-generic
This should ask you where you want to install the bootloader. This is typically the main drive, /dev/sda
or similar. This will overwrite your current bootloader and make your current system unbootable!
Adding a user
# adduser foo
##Answer adduser with password, name and so on
# usermod -aG sudo username
The last command will add sudo permissions for the user.
Misc things to configure
You probably want to configure those items.
Timezone:
# dpkg-reconfigure tzdata
Locales:
# dpkg-reconfigure locales
Install lubuntu-desktop
# apt-get lubuntu-desktop
This will install the meta-package lubuntu-desktop which depends on all you need for a standard lubuntu desktop. This takes a little while, as it is many packages. This will probably fail, as blueman will refuse to work without a running, proper system. Ignore it, and remove it with apt-get remove blueman
.
This should be more or less it. Reboot into your new system, and log in.
edited Apr 22 at 17:31
community wiki
2 revs
vidarlo
add a comment |Â
add a comment |Â
Q4OS is Debian based, it might support mkusb which is a great tool for making an installer USB.
â C.S.Cameron
Apr 21 at 22:45
This is not a duplicate of either of the questions it's marked as duplicate of in my opinion. The question is how to install Ubuntu from within q4OS as I read it.
â vidarlo
Apr 22 at 15:42
@vidarlo I would consider that off topic. We can't be expected to know how Q4OS works.
â Rinzwind
Apr 22 at 17:41
1
@Rinzwind Off topic would be a valid close reason... But the dupes was not a valid close reason.
â vidarlo
Apr 22 at 18:05
Why can't you "boot install from USB"? Add this detail to your question, and I'm sure someone would be happy to help.
â dpb
Apr 27 at 4:47