flat assembler
Message board for the users of flat assembler.

Index > Linux > how to boot linux from pendrive

Author
Thread Post new topic Reply to topic
Octavio



Joined: 21 Jun 2003
Posts: 366
Location: Spain
Octavio 21 Feb 2014, 13:10
Hello, i have installed linux(lubuntu) on a ext2 partition in a usb memory but it does not boot
so i have installed grub4dos in a fat32 partition in the same pendrive,how can i make grub loading linux?
or how to install linux in a pendrive without the limitations of live versions?
Post 21 Feb 2014, 13:10
View user's profile Send private message Visit poster's website Reply with quote
Fixit



Joined: 22 Nov 2012
Posts: 161
Fixit 22 Feb 2014, 07:28
I found the best results using Universal Boot Installer and your preferred .iso file

I have also found that some brands just will not be bootable.

Andy
Post 22 Feb 2014, 07:28
View user's profile Send private message Reply with quote
sleepsleep



Joined: 05 Oct 2006
Posts: 13036
Location: ˛                             ⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣⁣Posts: 0010456
sleepsleep 22 Feb 2014, 13:33
this tool could "burn" iso into pendrive,
http://unetbootin.sourceforge.net/
Post 22 Feb 2014, 13:33
View user's profile Send private message Reply with quote
gens



Joined: 18 Feb 2013
Posts: 161
gens 22 Feb 2014, 13:37
thing is the bootloader needs to know some things
like where to boot the actual kernel from
that info in grubs case is on a text file on a partition
also it should use the devices hardware name so it does'nt get confused if you put 2 usb's in the computer
(lilo on the other hand just c/p-s part of the kernel)

otherwise it should be just like a normal installation
http://askubuntu.com/questions/180023/can-i-install-grub-on-an-usb-and-make-it-a-rescue-disk
Post 22 Feb 2014, 13:37
View user's profile Send private message Reply with quote
rugxulo



Joined: 09 Aug 2005
Posts: 2341
Location: Usono (aka, USA)
rugxulo 12 Mar 2014, 11:36
Depends on the distro. Though when you say "without the limitations of a live version", I assume non-persistent changes (a la UNetBootIn) isn't what you want.

Perhaps PLoP Boot Manager (or similar) would help? At least, back in the day it helped boot Puppy Linux from USB on my old P4.

RUFUS claims to (also) work with Ubuntu/Kubuntu.

Or maybe Fedora's liveUSB creator? At least it worked in old F14 for me.

Even PC-BSD has ways to make a bootable USB, though I've not tried it.
Post 12 Mar 2014, 11:36
View user's profile Send private message Visit poster's website Reply with quote
Fixit



Joined: 22 Nov 2012
Posts: 161
Fixit 23 Mar 2014, 04:53
Octavio,

I use Puppy Linux 5.6.0.

It is small and does not have the limitations that most Linux versions have.

I found that Puppy installs well to pen drives compared to most other versions.

Andy
Post 23 Mar 2014, 04:53
View user's profile Send private message Reply with quote
KevinN



Joined: 09 Oct 2012
Posts: 160
KevinN 23 Mar 2014, 16:37
I forget what I did but I had manjaro booting from a usb, storing data on the usb etc. Maybe I googled and found some instruction. I don't remember. The USB had the separate partitions just like you would when configuring linux on a hard disk.
Post 23 Mar 2014, 16:37
View user's profile Send private message Reply with quote
Endre



Joined: 29 Dec 2003
Posts: 215
Location: Budapest, Hungary
Endre 24 Mar 2014, 21:25
Standard installer of Linux Mint installs also on usb pen drive without problems. According to my experiences however a memory stick of 16GB is a minimum. First partition must start at sector 2048 (1MB). That's all. It works with or without grub.

I forgot to mention that after installation it's worth to configure your system to minimize writing to the USB drive, just as if your system used an SSD. If you have enough memory in your computer then use no swap.
Post 24 Mar 2014, 21:25
View user's profile Send private message Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1166
Location: Overflow
Matrix 31 Aug 2014, 05:50
other methods that allow booting from usb using tools:

syslinux
extlinux
isohybrid
grub
Post 31 Aug 2014, 05:50
View user's profile Send private message Visit poster's website Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1166
Location: Overflow
Matrix 15 Sep 2014, 20:13
A detailed description installing extlinux on a drive and hacking your favorite linux on it using extlinux, if the iso has isolinux then it will possibly be this simple, and you an just copy the isolinux config file to extlinux:

best method i have found to boot from usb (or SSD).
Code:
#fdisk create first partition with max avail size and make it bootable
echo "n
p
1



a
1
w
"|fdisk /dev/driveyouwant

#install syslinux/extlinux mbr
dd if=/usr/lib/syslinux/mbr.bin of=/dev/driveyouwant bs=440 count=1 conv=notrunc

#reate your preferred type filesystem on your new first partition with 0 reserved space for root
#can be ext3 or ext4 if the krnel suppots it.
mkfs.ext2 -m 0 /dev/driveyouwant1

#mount your newly created first partition
mkdir /mnt/x && mount /dev/driveyouwant1 /mnt/x

#install extlinux on the device
mkdir -p /mnt/x/extlinux && extlinux --install /mnt/x/extlinux

#copy iso contents:
unalias cp
cp -a /mnt/1/ /mnt/x/

#cosmetic things...
mv /mnt/x/isolinux /mnt/x/extlinux

#summon extlinux configuration file, some hacking can be done if you want or need
ln /mnt/x/extlinux/isolinux.cfg /mnt/x/extlinux/extlinux.conf

#done, cleanup
umount /mnt/x/ /mnt/1/

#how you can test it on qemu virtual pc:
kvm -m 512M /dev/driveyouwant

    
Post 15 Sep 2014, 20:13
View user's profile Send private message Visit poster's website Reply with quote
r22



Joined: 27 Dec 2004
Posts: 805
r22 16 Sep 2014, 13:52
Ubuntu 14.04 (perhaps older versions as well) has the 'Startup Disk Creator' that will put the ISO on a thumb drive, there is also an option to allow for persistent storage.

The flash in most pen/thumb drives isn't always the best quality with regards to rewriting durability. Using a journaling file system like EXT will likely wearout your pen drive sooner than the default bootable FAT.
Post 16 Sep 2014, 13:52
View user's profile Send private message AIM Address Yahoo Messenger Reply with quote
Matrix



Joined: 04 Sep 2004
Posts: 1166
Location: Overflow
Matrix 16 Sep 2014, 14:12
r22 wrote:
Ubuntu 14.04 (perhaps older versions as well) has the 'Startup Disk Creator' that will put the ISO on a thumb drive, there is also an option to allow for persistent storage.

The flash in most pen/thumb drives isn't always the best quality with regards to rewriting durability. Using a journaling file system like EXT will likely wearout your pen drive sooner than the default bootable FAT.


Pendrive is ok for any fs, because it has wear leveling built in, also even the cheapest microsd card has wear leveling.
Note that flash memory has unlimited number of reads, you only wear your flash memory by rewriting them.

Ofc. do not put a swap on your pendrive if you want it to llive long.
Post 16 Sep 2014, 14:12
View user's profile Send private message Visit poster's website Reply with quote
Display posts from previous:
Post new topic Reply to topic

Jump to:  


< Last Thread | Next Thread >
Forum Rules:
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Copyright © 1999-2025, Tomasz Grysztar. Also on GitHub, YouTube.

Website powered by rwasa.