Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
This page from debian.org says 'Debian CD and DVD images can now be written directly to a USB stick, which is a very easy way to make a bootable USB stick'.
If this is true then I should be able to have debian on usb by simply using the following commands:
Code:
# cp debian.iso /dev/sdX
# sync
This is fantastic. Unfortunately the links on the page do not send me to the location for the 'hybrid' debian-10-usb-with-persistance .iso file.
Does anyone know where I can find the appropriate .iso file please? (I will need the non-free version which I think exists)
If it is THIS easy to have debian on usb (which I don't believe) then surely people should be making tutorials of this everywhere to promote Linux distros.
Thank you everyone for reading.
This page from debian.org says 'Debian CD and DVD images can now be written directly to a USB stick, which is a very easy way to make a bootable USB stick'.
Also please understand that this is not the same as "Installing". You're creating an installation medium.
I just drag and dropped a few iso's and have the choice to boot from any one. It doesn't work with all iso
but quite some useful ones. Also it allows persistence via a 1 gig .img file. Again it doesn't work with all. Some tweaks also need to be done but for instance i got Mint Cinnamon 64 bit working with persistence using the img file with label casper-rw. Also slackware current install dvd iso boots fine
Debian has some unofficial non-free firmware live iso's to download from here.
Thank you that was exactly the link I was looking for.
I downloaded the .iso file, used the cp command from the debian.org page (above) and it worked!
On booting from the usb the debian-installer loaded and I went through the install process for Debian 10.
My only problem is I can't get past the 'partition' section.
I first choose to partition the whole disk (usb) and the installer creates 2 default partitions:
1. A large primary boot partition labelled 'f' and
2. A small logical swap partition labelled 'F'.
This looks fine to me and I continue on to the next stage.
But the installer says it failed to partition the usb.
I tried deleting the swap partition - but that only resulted in the same partition being labelled 'free space'.
Since I'm using a hybrid debian .iso file for a usb - I'm wondering if I'm supposed to partition the usb differently somehow.
Does this mean I'm creating the debian-installer onto the usb?
In which case am I supposed to use the debian-installer to install onto a different target usb?
Yes, that is what it means
If your want a live iso, with persistance and not a true install, you will need a second partition on the usb for storage. I don't think that can be done from the running usb
Last edited by colorpurple21859; 07-09-2020 at 07:04 AM.
Yes, that is what it means
If your want a live iso, with persistance and not a true install, you will need a second partition on the usb for storage. I don't think that can be done from the running usb
Still having problems with this Debian 10 install.
I used the usb with debian-installer to install Debian 10 onto a seperate usb.
Everything seemed to go smoothly until the last step - where to install grub?
The debian-installer asks whether to install grub bootloader onto the master boot record of my hard disk.
Since the OS is on a portable usb I set the grub bootloader to install onto my target usb instead.
But now after successfully completing the install the target usb will not boot.
What am I doing wrong?
Do I need to re-install grub onto the target usb?
Or do I need to do the install again - only this time installing grub bootloader onto the mbr of my hard disk?
yes that would be a better solution.
The short version:
If you are going to use it on uefi systems the usb will need a 200MB fat32 partition mounted at the usb /boot/efi.
To reinstall grub boot the installer mount the usb roofs partition, mount the efi partition to the usb boot/efi, use mount --bind to mount /dev /proc /sys /run to the same directories of the usb, chroot <mount point of usb>
for efi run
Code:
grub-install --target=x86_64-efi-efi --removable
, for legacy
Code:
grub-install --target=i386-pc /dev/sd?
where ? will the usb letter.
Run update-grub to get a grub menu
I think debian will only install grub-efi or grub-i386pc you will have to use apt to install the missing grub-target.
Last edited by colorpurple21859; 07-09-2020 at 12:01 PM.
where ? will the usb letter.
Run update-grub to get a grub menu
I think debian will only install grub-efi or grub-i386pc you will have to use apt to install the missing grub-target.
Thank you for your reply.
This is a little bit complicated as I don't know anything about programming.
I have BIOS.
Should I install grub from a working debian OS onto the target usb? Or do I boot debian-installer to do that?
Is it easier if I go through the whole install process again and install grub to the mbr of my harddisk?
In which case, will the usb boot on any other device?
Should I install grub from a working debian OS onto the target usb? Or do I boot debian-installer to do that?
A working debian OS will be easier. To install on a bios system. plug in the usb and as root run
Code:
parted -l
to determine what /dev your usb is and the partitions are. assuming the usb is /dev/sdb and the root partition is /dev/sdb2, for example purposes only(yours may be different and change acordingly) as root
Code:
mount /dev/sdb2 /mnt
grub-install --boot-directory=/mnt/boot /dev/sdb
find the UUID of the /dev/sdb2 with
Code:
lsblk -f
copy the /boot/grub/grub.cfg from debian over to the usb boot/grub.
edit the first debian menu entry and change uuids to match the uuid of /dev/sdb2 and kernel versions numbers of the kernels in the usb /boot.
Boot the usb and run update-grub
Last edited by colorpurple21859; 07-09-2020 at 08:27 PM.
A working debian OS will be easier. To install on a bios system. plug in the usb and as root run
Code:
parted -l
to determine what /dev your usb is and the partitions are. assuming the usb is /dev/sdb and the root partition is /dev/sdb2, for example purposes only(yours may be different and change acordingly) as root
Code:
mount /dev/sdb2 /mnt
grub-install --boot-directory=/mnt/boot /dev/sdb
After running 'parted -l' I get this:
Code:
Model: Samsung Flash Drive (scsi)
Disk /dev/sdg: 64.2GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 1049kB 56.1GB 56.1GB primary ext4
2 56.1GB 64.2GB 8048MB extended
5 56.1GB 64.2GB 8048MB logical linux-swap(v1)
I'm guessing the root partition is sdg2. But when I try to mount it I get the following error message:
Code:
# mount /dev/sdg2 /mnt
mount: wrong fs type, bad option, bad superblock on /dev/sdg2,
missing codepage or helper program, or other error
In some cases useful info is found in syslog - try
dmesg | tail or so.
mount /dev/sdg1 /mnt
grub-install --boot-directory=/mnt/boot /dev/sdg
sdg2 is an extented partition that the swap partition resides inside of.
An extended partition allows an msdos type disk to have more than 4 partitions
Last edited by colorpurple21859; 07-09-2020 at 10:50 PM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.