Live USB on a 2-partition usb-drive
I was wondering if I could have 2 partitions on a USB-drive that would allow me to boot on my key as a regular USB-installation-disk (partition1), and another partition for regular storage under Windows/Ubuntu (partition2). I would like to have a disk with :
/dev/sdb (16GB)
- sdb1 : ext4/fat32, LiveUSB (2GB)
- sdb2 : fat32, storage (14GB)
Could that key be booted AND used as a regular USB drive ?
PS: that is because I'm sick of installing/uninstalling Ubuntu on my USB drive everytime I need to rescue a PC, and I'm not willing to buy a USB-drive only for Ubuntu-installation-disk.
partitioning live-usb usb-drive
add a comment |
I was wondering if I could have 2 partitions on a USB-drive that would allow me to boot on my key as a regular USB-installation-disk (partition1), and another partition for regular storage under Windows/Ubuntu (partition2). I would like to have a disk with :
/dev/sdb (16GB)
- sdb1 : ext4/fat32, LiveUSB (2GB)
- sdb2 : fat32, storage (14GB)
Could that key be booted AND used as a regular USB drive ?
PS: that is because I'm sick of installing/uninstalling Ubuntu on my USB drive everytime I need to rescue a PC, and I'm not willing to buy a USB-drive only for Ubuntu-installation-disk.
partitioning live-usb usb-drive
add a comment |
I was wondering if I could have 2 partitions on a USB-drive that would allow me to boot on my key as a regular USB-installation-disk (partition1), and another partition for regular storage under Windows/Ubuntu (partition2). I would like to have a disk with :
/dev/sdb (16GB)
- sdb1 : ext4/fat32, LiveUSB (2GB)
- sdb2 : fat32, storage (14GB)
Could that key be booted AND used as a regular USB drive ?
PS: that is because I'm sick of installing/uninstalling Ubuntu on my USB drive everytime I need to rescue a PC, and I'm not willing to buy a USB-drive only for Ubuntu-installation-disk.
partitioning live-usb usb-drive
I was wondering if I could have 2 partitions on a USB-drive that would allow me to boot on my key as a regular USB-installation-disk (partition1), and another partition for regular storage under Windows/Ubuntu (partition2). I would like to have a disk with :
/dev/sdb (16GB)
- sdb1 : ext4/fat32, LiveUSB (2GB)
- sdb2 : fat32, storage (14GB)
Could that key be booted AND used as a regular USB drive ?
PS: that is because I'm sick of installing/uninstalling Ubuntu on my USB drive everytime I need to rescue a PC, and I'm not willing to buy a USB-drive only for Ubuntu-installation-disk.
partitioning live-usb usb-drive
partitioning live-usb usb-drive
edited Feb 19 '14 at 20:17
MrVaykadji
asked Feb 19 '14 at 19:02
MrVaykadjiMrVaykadji
3,93722152
3,93722152
add a comment |
add a comment |
7 Answers
7
active
oldest
votes
Yes, you can partition a USB flash drive to boot into a Ubuntu Live Session and use it as a regular USB drive (accessable to windows) on separate partitions. I was able to do this with a 32GB PNY USB 2.0 flash drive on a Sony Vaio T Series Ultrabook laptop with UEFI and Windows 8.0 installed. I also tested this from Ubuntu server 12.04 on my 16TB RAID5 i7-290 server.
I partitioned the USB flash drive using GParted in this configuration:
sdh1
is the "Storage" partition that's accessible from Windows. sdh2
is the Ubuntu desktop 12.04 boot-able partition. These were my steps:
1. Created a new 10 GB, ntfs, logical partition, with 25 MB Free space preceding
and 0 MB following, labeled Storage (must be first on the drive)
2. Created a new 5 GB, fat32, logical partition, with 0 MB preceding and following
3. Set a boot flag for the second partition
4. (Created the other partitions which are not needed)
5. Booted to a Ubuntu Live Session loaded on a DVD and selected Try Ubuntu
without installing from the GRUB menu
6. Opened Startup Disk Creator with the USB flash drive pluged-in
7. The Ubuntu-Desktop 12.04 Image and pny USB 2.0 flash drive (/dev/sdh2) 5.0 GB
partition were already selected, moved the How much slide to store documents
and settings in reserved extra space and selected Make Startup Disk
Without selecting the boot flag, the Startup Disk Creator would only recognize the entire flash drive as /dev/sdh
, instead of the desired second partition /dev/sdh2
.
Without putting the Windows partition first, the Removable Media Bit...
"The removable media device setting is a flag contained within the SCSI Inquiry Data
response to the SCSI Inquiry command. Bit 7 of byte 1 (indexed from 0) is the
Removable Media Bit (RMB). An RMB set to zero indicates that the device is not a
removable media device. An RMB of one indicates that the device is a removable
media device. Drivers obtain this information by using the StorageDeviceProperty
request."
...would mean only 1 partition shows up in Windows:
"Q. What is a superfloppy?
A.
Removable media without either GPT or MBR formatting is considered a "superfloppy."
The entire media is treated as a single partition.
The media manufacturer performs any MBR partitioning of removable media. If the
media does have an MBR, only one partition is supported. There is little
user-discernible difference between MBR-partitioned media and superfloppies.
Examples of removable media include floppy disk drives, JAZ disk cartridges,
magneto-optical media, DVD-ROM, and CD-ROM. Hard disk drives on external buses
such as SCSI or IEEE 1394 are not considered removable."
Here are some tools that flip the RMB (which is unnecessary in this case):
Laxar's USB Format Tool
Bootice
RMPrepUSB
These are software approaches (again unnecessary in this case):
Create a dummy.sys Driver
Use the Hitachi Microdrive Filterdriver
Credit:
TSJNachos117 Live USB on a 2-partition usb-drive
http://ubuntuforums.org/showthread.php?t=1020293
https://stackoverflow.com/questions/2598502/howto-flip-removable-bit-on-usb-drive-in-c
http://www.rmprepusb.com/tutorials/multipartufd
Thanks, I'll try that. I know I could use a folder inside the same partition, but that is NOT graceful. I want a nice thing, it's in my everyday life and I want some class :) // Not to brag but I also know how to use partition tools; what made me ask was if I could or not boot with a partitionned USB-drive.
– MrVaykadji
Feb 20 '14 at 0:14
It does; I just verified to be sure. I like your idea though and am expanding upon it to create 3 partitions: Ubuntu12.04 (bootable), Hirens (bootable), and Storage. I'd like to be classy like that too ;)
– conman253
Feb 20 '14 at 1:13
Got it to work much easier than anything I found online...finally.
– conman253
Feb 26 '14 at 4:40
4
Is there a reason for the 25 MB preceding the partitions? Why 25? Does the size differ based on the total space of the flash drive?
– stevendesu
Oct 27 '15 at 20:39
1
This post is obsolete SDC has not had a persistence pointer since 14.04.
– C.S.Cameron
Aug 11 '18 at 17:54
|
show 5 more comments
I found an alternative way which is more straightforward. There are 2 important pieces of information one needs to understand about why this works. The first is about the boot process and how the initial power on self test (executed by the BIOS) looks for a boot record on the first boot sector of the devices attached. This is a small file which basically passes the boot execution process onto the boot loader/manager such as GRUB2 on newer linux installs. For more information on this, read this very informative post.
The 2nd piece of information is to understand that the ISO downloads for Linux OSes are designed to be installed on a disk (CD/DVD/USB) and not for a partition. These ISOs need to be modified using a small tool which can be found on the syslinux-utils package, called isohybrid. The ISO modification for installation on a partition is done with the --partok
flag. I found this information from this post which describes the exact same issue.
I am not sure how the --partok
magic works, I searched for some explanation but could not find any.
In summary, here is what I did to get my live PureOS install to boot from a usb partition,
- Partitioned my USB using GNOME disk, I initially formatted the disk using MBR/DOS. I created a 4GB partition (FAT32) followed by a an ext4 linux partition in the remaining space for my backups.
- Next I modified the ISO file I downloaded to make it bootable from the partition. To do this I had to install the syslinux-util from my repo
sudo apt-get install syslinux-util
in which the isohydrid tool resides. I then modified the ISO file,isohybrid --partok pureos.ISO
- I used dd to copy this ISO to the above partition. You can get the partition device from the GNOME disk details.
dd if=pureos.ISO of=/dev/sdb1 bs=1M
.
- from GNOME disk I edited the partiton and checked the Bootable option which installs the required book record.
I was now able to boot from the USB key into the live CD and use it as a recovery soluton while storing my system backups on the other partition.
add a comment |
The simple answer is yes, but you can go simpler!
make sure you an ISO of the Linux flavour you want on the drive and UNetbootin, available from here: http://unetbootin.sourceforge.net/
Make sure you select Hard Disk install from the drop down and to copy all your data from the drive before starting. You should be able to use the rest of the space for your other purposes!
That's not really what I want to do, the reason I want to separate partitions is to have a clean storage space, without all the folders from the ubuntu installation disk. Just having them hidden wouldn't work since I use the USB-drive on both Windows and Ubuntu.
– MrVaykadji
Feb 19 '14 at 20:19
Also, Unetbootin will only allow me to boot the live in English, and I want to use my native language.
– MrVaykadji
Feb 19 '14 at 20:20
Once unetbootin is installed, you can use a partition manager to shrink the partition and add one for your own files after it (gparted would do it perfectly) As for the language change, you can edit the bootloader to to add kernel parameters, see <help.ubuntu.com/lts/installation-guide/powerpc/boot-parms.html> in regard to debian-installer/language (language), debian-installer/country (country), debian-installer/locale (locale) to force your required locale
– Viperfang
Feb 19 '14 at 20:32
yes, but would I still be able to boot my USB key for a live-session ?
– MrVaykadji
Feb 19 '14 at 21:19
add a comment |
Persistent live drive
You can use mkusb to create a persistent live drive. It will create 5 partitions. See this link,
help.ubuntu.com/community/mkusb
Partition #1 has the label 'usbdata' and the file system NTFS, which can be used by both Ubuntu and Windows in order to store files and transfer files between computers.
The other partitions belong to the Ubuntu persistent live system.
See this link for more details,
help.ubuntu.com/community/mkusb/persistent#Partitions
partition: (NTFS) usbdata for storage and transfer of files
partition: GPT: bios_grub flag for booting in BIOS mode; MSDOS: extended partition
partition: (FAT32) boot partition
partition: (ISO 9660) cloned iso file
partition: (ext4) casper-rw or live-rw or persistence
Details
Details about the partitions from and after making the persistent live system:
...
parted -s "/dev/sdd" print
Model: SanDisk Extreme (scsi)
Disk /dev/sdd: 16,0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
2 1049kB 2097kB 1049kB primary bios_grub
3 2097kB 258MB 256MB fat32 primary boot, esp
4 258MB 1791MB 1533MB primary
5 1791MB 8902MB 7111MB ext2 primary
1 8902MB 16,0GB 7111MB ntfs primary msftdata
lsblk -o MODEL,NAME,FSTYPE,LABEL,MOUNTPOINT,SIZE "/dev/sdd"
MODEL NAME FSTYPE LABEL MOUNTPOINT SIZE
Extreme sdd 14,9G
|-sdd1 ntfs usbdata 6,6G
|-sdd2 1M
|-sdd3 vfat usbboot 244M
|-sdd4 iso9660 Ubuntu 16.04.1 LTS amd64 1,4G
`-sdd5 ext4 casper-rw 6,6G
</pre>
Done :-)
The target device is ready to use.
'ubuntu-16.04.1-desktop-amd64.iso'
was installed
gparted
in 16.04 LTS not recognizing iso 9660 file system and bios_grub boot image:
gparted
in 17.10 seeing iso 9660 file system and bios_grub boot image:
add a comment |
- You want to preserve the main part of your USB as FAT32 storage 14GB
- You want LiveUSB part in Ext4 2GB
Then the layout of your USB follow:
sdb1 14GB Fat32 storage and EFI folder
sdb2 2GB Ext4 LiveUSB
- You have to create the Fat32 part fist to be seen under Windows, as without many tweak, Windows only mount the 1st partition of your USB
- This Fat32 partition also hold EFI folder to boot your LiveUSB part
- If you want the LiveUSB partition sdb2 on Ext4. By default, the built-in bootx64.efi of the LiveUSB will not boot an Ext4 partition.
So I have made a tweaked bootx64.efi. You just copy the file to sdb1/EFI/boot/. And it will boot your Ext4 LiveUSB part. All of my detail here https://github.com/sonvirgo/Ext4-LiveUSB
Very interesting. Will this method allow use of a casper-rw partition?
– C.S.Cameron
Aug 11 '18 at 18:11
@C.S.Cameron Yet, sure. You can add an additional ext4 partition for casper-rw. As far as this still hold:source $prefix/x86_64-efi/grub.cfg
so that bootx64.efi can find grub's partition. Update my answer with Windows 10 1703+, you are free to make multiple partitions in any order. All are mountable under 1703+
– Son Nguyen
Aug 16 '18 at 2:45
add a comment |
This should be easy to do. However, be warned in advanced that Windows will only be able to see the first partition (/dev/sdb1), the second partition will be invisible (I don't know why). Therefore, I would recommend the general-purpose storage partition be the first one, and the LiveUSB partition be the second one.
If after doing this, you can't get the key to boot, you should be able to set the Boot flag using GParted.
Please note: although I've successfully done this before, I've never tested doing something like this on a UEFI-based system, let alone something that uses Secure Boot.
I'm afraid I'll have to argue that point. I, myself have a flash drive which I use both as a LiveUSB version of Ubuntu, and for general storage. My first partition is an NTFS partition, which works perfectly on both XP and 7. My second partition is a FAT32 partition, which contains a live version of Ubuntu. I can't even see this partition from Windows, even from the disk manager (diskmgmt.msc). However, i can boot from it, and read from/write to it from Ubuntu. See the 4th paragraphHERE.
– TSJNachos117
Feb 23 '14 at 5:28
Apologies for the down-vote. After reading your comment I realized my test Ubuntu Live boot partition was not first. If you make a small edit I will give a well deserved up-vote.
– conman253
Feb 26 '14 at 4:38
What edit is that?
– TSJNachos117
Feb 27 '14 at 5:53
The forum won't let me change my down-vote until your answer is edited. I tried just adding <p> but no luck. You could just remove them.
– conman253
Feb 27 '14 at 18:11
Nowadays Windows 10 allows access to multiple "Windows FS type" partitions. Fat32, NTFS, UDF.
– C.S.Cameron
Aug 11 '18 at 18:14
add a comment |
An easy solution:
Use KDE Partition Manager to delete all partitions and create a
2,048
MB primary partition, FAT32.Use unetbootin to write the ISO (Ubuntu 18.04 is about that size, 2GB). Don't worry that it appears to only write to
/dev/sda
, not a particular partition.Use Kde Partition Manager again to allocate the remaining space to your data partition. I chose the NTFS file system for interoperability with Windows.
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f423300%2flive-usb-on-a-2-partition-usb-drive%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
7 Answers
7
active
oldest
votes
7 Answers
7
active
oldest
votes
active
oldest
votes
active
oldest
votes
Yes, you can partition a USB flash drive to boot into a Ubuntu Live Session and use it as a regular USB drive (accessable to windows) on separate partitions. I was able to do this with a 32GB PNY USB 2.0 flash drive on a Sony Vaio T Series Ultrabook laptop with UEFI and Windows 8.0 installed. I also tested this from Ubuntu server 12.04 on my 16TB RAID5 i7-290 server.
I partitioned the USB flash drive using GParted in this configuration:
sdh1
is the "Storage" partition that's accessible from Windows. sdh2
is the Ubuntu desktop 12.04 boot-able partition. These were my steps:
1. Created a new 10 GB, ntfs, logical partition, with 25 MB Free space preceding
and 0 MB following, labeled Storage (must be first on the drive)
2. Created a new 5 GB, fat32, logical partition, with 0 MB preceding and following
3. Set a boot flag for the second partition
4. (Created the other partitions which are not needed)
5. Booted to a Ubuntu Live Session loaded on a DVD and selected Try Ubuntu
without installing from the GRUB menu
6. Opened Startup Disk Creator with the USB flash drive pluged-in
7. The Ubuntu-Desktop 12.04 Image and pny USB 2.0 flash drive (/dev/sdh2) 5.0 GB
partition were already selected, moved the How much slide to store documents
and settings in reserved extra space and selected Make Startup Disk
Without selecting the boot flag, the Startup Disk Creator would only recognize the entire flash drive as /dev/sdh
, instead of the desired second partition /dev/sdh2
.
Without putting the Windows partition first, the Removable Media Bit...
"The removable media device setting is a flag contained within the SCSI Inquiry Data
response to the SCSI Inquiry command. Bit 7 of byte 1 (indexed from 0) is the
Removable Media Bit (RMB). An RMB set to zero indicates that the device is not a
removable media device. An RMB of one indicates that the device is a removable
media device. Drivers obtain this information by using the StorageDeviceProperty
request."
...would mean only 1 partition shows up in Windows:
"Q. What is a superfloppy?
A.
Removable media without either GPT or MBR formatting is considered a "superfloppy."
The entire media is treated as a single partition.
The media manufacturer performs any MBR partitioning of removable media. If the
media does have an MBR, only one partition is supported. There is little
user-discernible difference between MBR-partitioned media and superfloppies.
Examples of removable media include floppy disk drives, JAZ disk cartridges,
magneto-optical media, DVD-ROM, and CD-ROM. Hard disk drives on external buses
such as SCSI or IEEE 1394 are not considered removable."
Here are some tools that flip the RMB (which is unnecessary in this case):
Laxar's USB Format Tool
Bootice
RMPrepUSB
These are software approaches (again unnecessary in this case):
Create a dummy.sys Driver
Use the Hitachi Microdrive Filterdriver
Credit:
TSJNachos117 Live USB on a 2-partition usb-drive
http://ubuntuforums.org/showthread.php?t=1020293
https://stackoverflow.com/questions/2598502/howto-flip-removable-bit-on-usb-drive-in-c
http://www.rmprepusb.com/tutorials/multipartufd
Thanks, I'll try that. I know I could use a folder inside the same partition, but that is NOT graceful. I want a nice thing, it's in my everyday life and I want some class :) // Not to brag but I also know how to use partition tools; what made me ask was if I could or not boot with a partitionned USB-drive.
– MrVaykadji
Feb 20 '14 at 0:14
It does; I just verified to be sure. I like your idea though and am expanding upon it to create 3 partitions: Ubuntu12.04 (bootable), Hirens (bootable), and Storage. I'd like to be classy like that too ;)
– conman253
Feb 20 '14 at 1:13
Got it to work much easier than anything I found online...finally.
– conman253
Feb 26 '14 at 4:40
4
Is there a reason for the 25 MB preceding the partitions? Why 25? Does the size differ based on the total space of the flash drive?
– stevendesu
Oct 27 '15 at 20:39
1
This post is obsolete SDC has not had a persistence pointer since 14.04.
– C.S.Cameron
Aug 11 '18 at 17:54
|
show 5 more comments
Yes, you can partition a USB flash drive to boot into a Ubuntu Live Session and use it as a regular USB drive (accessable to windows) on separate partitions. I was able to do this with a 32GB PNY USB 2.0 flash drive on a Sony Vaio T Series Ultrabook laptop with UEFI and Windows 8.0 installed. I also tested this from Ubuntu server 12.04 on my 16TB RAID5 i7-290 server.
I partitioned the USB flash drive using GParted in this configuration:
sdh1
is the "Storage" partition that's accessible from Windows. sdh2
is the Ubuntu desktop 12.04 boot-able partition. These were my steps:
1. Created a new 10 GB, ntfs, logical partition, with 25 MB Free space preceding
and 0 MB following, labeled Storage (must be first on the drive)
2. Created a new 5 GB, fat32, logical partition, with 0 MB preceding and following
3. Set a boot flag for the second partition
4. (Created the other partitions which are not needed)
5. Booted to a Ubuntu Live Session loaded on a DVD and selected Try Ubuntu
without installing from the GRUB menu
6. Opened Startup Disk Creator with the USB flash drive pluged-in
7. The Ubuntu-Desktop 12.04 Image and pny USB 2.0 flash drive (/dev/sdh2) 5.0 GB
partition were already selected, moved the How much slide to store documents
and settings in reserved extra space and selected Make Startup Disk
Without selecting the boot flag, the Startup Disk Creator would only recognize the entire flash drive as /dev/sdh
, instead of the desired second partition /dev/sdh2
.
Without putting the Windows partition first, the Removable Media Bit...
"The removable media device setting is a flag contained within the SCSI Inquiry Data
response to the SCSI Inquiry command. Bit 7 of byte 1 (indexed from 0) is the
Removable Media Bit (RMB). An RMB set to zero indicates that the device is not a
removable media device. An RMB of one indicates that the device is a removable
media device. Drivers obtain this information by using the StorageDeviceProperty
request."
...would mean only 1 partition shows up in Windows:
"Q. What is a superfloppy?
A.
Removable media without either GPT or MBR formatting is considered a "superfloppy."
The entire media is treated as a single partition.
The media manufacturer performs any MBR partitioning of removable media. If the
media does have an MBR, only one partition is supported. There is little
user-discernible difference between MBR-partitioned media and superfloppies.
Examples of removable media include floppy disk drives, JAZ disk cartridges,
magneto-optical media, DVD-ROM, and CD-ROM. Hard disk drives on external buses
such as SCSI or IEEE 1394 are not considered removable."
Here are some tools that flip the RMB (which is unnecessary in this case):
Laxar's USB Format Tool
Bootice
RMPrepUSB
These are software approaches (again unnecessary in this case):
Create a dummy.sys Driver
Use the Hitachi Microdrive Filterdriver
Credit:
TSJNachos117 Live USB on a 2-partition usb-drive
http://ubuntuforums.org/showthread.php?t=1020293
https://stackoverflow.com/questions/2598502/howto-flip-removable-bit-on-usb-drive-in-c
http://www.rmprepusb.com/tutorials/multipartufd
Thanks, I'll try that. I know I could use a folder inside the same partition, but that is NOT graceful. I want a nice thing, it's in my everyday life and I want some class :) // Not to brag but I also know how to use partition tools; what made me ask was if I could or not boot with a partitionned USB-drive.
– MrVaykadji
Feb 20 '14 at 0:14
It does; I just verified to be sure. I like your idea though and am expanding upon it to create 3 partitions: Ubuntu12.04 (bootable), Hirens (bootable), and Storage. I'd like to be classy like that too ;)
– conman253
Feb 20 '14 at 1:13
Got it to work much easier than anything I found online...finally.
– conman253
Feb 26 '14 at 4:40
4
Is there a reason for the 25 MB preceding the partitions? Why 25? Does the size differ based on the total space of the flash drive?
– stevendesu
Oct 27 '15 at 20:39
1
This post is obsolete SDC has not had a persistence pointer since 14.04.
– C.S.Cameron
Aug 11 '18 at 17:54
|
show 5 more comments
Yes, you can partition a USB flash drive to boot into a Ubuntu Live Session and use it as a regular USB drive (accessable to windows) on separate partitions. I was able to do this with a 32GB PNY USB 2.0 flash drive on a Sony Vaio T Series Ultrabook laptop with UEFI and Windows 8.0 installed. I also tested this from Ubuntu server 12.04 on my 16TB RAID5 i7-290 server.
I partitioned the USB flash drive using GParted in this configuration:
sdh1
is the "Storage" partition that's accessible from Windows. sdh2
is the Ubuntu desktop 12.04 boot-able partition. These were my steps:
1. Created a new 10 GB, ntfs, logical partition, with 25 MB Free space preceding
and 0 MB following, labeled Storage (must be first on the drive)
2. Created a new 5 GB, fat32, logical partition, with 0 MB preceding and following
3. Set a boot flag for the second partition
4. (Created the other partitions which are not needed)
5. Booted to a Ubuntu Live Session loaded on a DVD and selected Try Ubuntu
without installing from the GRUB menu
6. Opened Startup Disk Creator with the USB flash drive pluged-in
7. The Ubuntu-Desktop 12.04 Image and pny USB 2.0 flash drive (/dev/sdh2) 5.0 GB
partition were already selected, moved the How much slide to store documents
and settings in reserved extra space and selected Make Startup Disk
Without selecting the boot flag, the Startup Disk Creator would only recognize the entire flash drive as /dev/sdh
, instead of the desired second partition /dev/sdh2
.
Without putting the Windows partition first, the Removable Media Bit...
"The removable media device setting is a flag contained within the SCSI Inquiry Data
response to the SCSI Inquiry command. Bit 7 of byte 1 (indexed from 0) is the
Removable Media Bit (RMB). An RMB set to zero indicates that the device is not a
removable media device. An RMB of one indicates that the device is a removable
media device. Drivers obtain this information by using the StorageDeviceProperty
request."
...would mean only 1 partition shows up in Windows:
"Q. What is a superfloppy?
A.
Removable media without either GPT or MBR formatting is considered a "superfloppy."
The entire media is treated as a single partition.
The media manufacturer performs any MBR partitioning of removable media. If the
media does have an MBR, only one partition is supported. There is little
user-discernible difference between MBR-partitioned media and superfloppies.
Examples of removable media include floppy disk drives, JAZ disk cartridges,
magneto-optical media, DVD-ROM, and CD-ROM. Hard disk drives on external buses
such as SCSI or IEEE 1394 are not considered removable."
Here are some tools that flip the RMB (which is unnecessary in this case):
Laxar's USB Format Tool
Bootice
RMPrepUSB
These are software approaches (again unnecessary in this case):
Create a dummy.sys Driver
Use the Hitachi Microdrive Filterdriver
Credit:
TSJNachos117 Live USB on a 2-partition usb-drive
http://ubuntuforums.org/showthread.php?t=1020293
https://stackoverflow.com/questions/2598502/howto-flip-removable-bit-on-usb-drive-in-c
http://www.rmprepusb.com/tutorials/multipartufd
Yes, you can partition a USB flash drive to boot into a Ubuntu Live Session and use it as a regular USB drive (accessable to windows) on separate partitions. I was able to do this with a 32GB PNY USB 2.0 flash drive on a Sony Vaio T Series Ultrabook laptop with UEFI and Windows 8.0 installed. I also tested this from Ubuntu server 12.04 on my 16TB RAID5 i7-290 server.
I partitioned the USB flash drive using GParted in this configuration:
sdh1
is the "Storage" partition that's accessible from Windows. sdh2
is the Ubuntu desktop 12.04 boot-able partition. These were my steps:
1. Created a new 10 GB, ntfs, logical partition, with 25 MB Free space preceding
and 0 MB following, labeled Storage (must be first on the drive)
2. Created a new 5 GB, fat32, logical partition, with 0 MB preceding and following
3. Set a boot flag for the second partition
4. (Created the other partitions which are not needed)
5. Booted to a Ubuntu Live Session loaded on a DVD and selected Try Ubuntu
without installing from the GRUB menu
6. Opened Startup Disk Creator with the USB flash drive pluged-in
7. The Ubuntu-Desktop 12.04 Image and pny USB 2.0 flash drive (/dev/sdh2) 5.0 GB
partition were already selected, moved the How much slide to store documents
and settings in reserved extra space and selected Make Startup Disk
Without selecting the boot flag, the Startup Disk Creator would only recognize the entire flash drive as /dev/sdh
, instead of the desired second partition /dev/sdh2
.
Without putting the Windows partition first, the Removable Media Bit...
"The removable media device setting is a flag contained within the SCSI Inquiry Data
response to the SCSI Inquiry command. Bit 7 of byte 1 (indexed from 0) is the
Removable Media Bit (RMB). An RMB set to zero indicates that the device is not a
removable media device. An RMB of one indicates that the device is a removable
media device. Drivers obtain this information by using the StorageDeviceProperty
request."
...would mean only 1 partition shows up in Windows:
"Q. What is a superfloppy?
A.
Removable media without either GPT or MBR formatting is considered a "superfloppy."
The entire media is treated as a single partition.
The media manufacturer performs any MBR partitioning of removable media. If the
media does have an MBR, only one partition is supported. There is little
user-discernible difference between MBR-partitioned media and superfloppies.
Examples of removable media include floppy disk drives, JAZ disk cartridges,
magneto-optical media, DVD-ROM, and CD-ROM. Hard disk drives on external buses
such as SCSI or IEEE 1394 are not considered removable."
Here are some tools that flip the RMB (which is unnecessary in this case):
Laxar's USB Format Tool
Bootice
RMPrepUSB
These are software approaches (again unnecessary in this case):
Create a dummy.sys Driver
Use the Hitachi Microdrive Filterdriver
Credit:
TSJNachos117 Live USB on a 2-partition usb-drive
http://ubuntuforums.org/showthread.php?t=1020293
https://stackoverflow.com/questions/2598502/howto-flip-removable-bit-on-usb-drive-in-c
http://www.rmprepusb.com/tutorials/multipartufd
edited May 23 '17 at 12:39
Community♦
1
1
answered Feb 20 '14 at 0:10
conman253conman253
936520
936520
Thanks, I'll try that. I know I could use a folder inside the same partition, but that is NOT graceful. I want a nice thing, it's in my everyday life and I want some class :) // Not to brag but I also know how to use partition tools; what made me ask was if I could or not boot with a partitionned USB-drive.
– MrVaykadji
Feb 20 '14 at 0:14
It does; I just verified to be sure. I like your idea though and am expanding upon it to create 3 partitions: Ubuntu12.04 (bootable), Hirens (bootable), and Storage. I'd like to be classy like that too ;)
– conman253
Feb 20 '14 at 1:13
Got it to work much easier than anything I found online...finally.
– conman253
Feb 26 '14 at 4:40
4
Is there a reason for the 25 MB preceding the partitions? Why 25? Does the size differ based on the total space of the flash drive?
– stevendesu
Oct 27 '15 at 20:39
1
This post is obsolete SDC has not had a persistence pointer since 14.04.
– C.S.Cameron
Aug 11 '18 at 17:54
|
show 5 more comments
Thanks, I'll try that. I know I could use a folder inside the same partition, but that is NOT graceful. I want a nice thing, it's in my everyday life and I want some class :) // Not to brag but I also know how to use partition tools; what made me ask was if I could or not boot with a partitionned USB-drive.
– MrVaykadji
Feb 20 '14 at 0:14
It does; I just verified to be sure. I like your idea though and am expanding upon it to create 3 partitions: Ubuntu12.04 (bootable), Hirens (bootable), and Storage. I'd like to be classy like that too ;)
– conman253
Feb 20 '14 at 1:13
Got it to work much easier than anything I found online...finally.
– conman253
Feb 26 '14 at 4:40
4
Is there a reason for the 25 MB preceding the partitions? Why 25? Does the size differ based on the total space of the flash drive?
– stevendesu
Oct 27 '15 at 20:39
1
This post is obsolete SDC has not had a persistence pointer since 14.04.
– C.S.Cameron
Aug 11 '18 at 17:54
Thanks, I'll try that. I know I could use a folder inside the same partition, but that is NOT graceful. I want a nice thing, it's in my everyday life and I want some class :) // Not to brag but I also know how to use partition tools; what made me ask was if I could or not boot with a partitionned USB-drive.
– MrVaykadji
Feb 20 '14 at 0:14
Thanks, I'll try that. I know I could use a folder inside the same partition, but that is NOT graceful. I want a nice thing, it's in my everyday life and I want some class :) // Not to brag but I also know how to use partition tools; what made me ask was if I could or not boot with a partitionned USB-drive.
– MrVaykadji
Feb 20 '14 at 0:14
It does; I just verified to be sure. I like your idea though and am expanding upon it to create 3 partitions: Ubuntu12.04 (bootable), Hirens (bootable), and Storage. I'd like to be classy like that too ;)
– conman253
Feb 20 '14 at 1:13
It does; I just verified to be sure. I like your idea though and am expanding upon it to create 3 partitions: Ubuntu12.04 (bootable), Hirens (bootable), and Storage. I'd like to be classy like that too ;)
– conman253
Feb 20 '14 at 1:13
Got it to work much easier than anything I found online...finally.
– conman253
Feb 26 '14 at 4:40
Got it to work much easier than anything I found online...finally.
– conman253
Feb 26 '14 at 4:40
4
4
Is there a reason for the 25 MB preceding the partitions? Why 25? Does the size differ based on the total space of the flash drive?
– stevendesu
Oct 27 '15 at 20:39
Is there a reason for the 25 MB preceding the partitions? Why 25? Does the size differ based on the total space of the flash drive?
– stevendesu
Oct 27 '15 at 20:39
1
1
This post is obsolete SDC has not had a persistence pointer since 14.04.
– C.S.Cameron
Aug 11 '18 at 17:54
This post is obsolete SDC has not had a persistence pointer since 14.04.
– C.S.Cameron
Aug 11 '18 at 17:54
|
show 5 more comments
I found an alternative way which is more straightforward. There are 2 important pieces of information one needs to understand about why this works. The first is about the boot process and how the initial power on self test (executed by the BIOS) looks for a boot record on the first boot sector of the devices attached. This is a small file which basically passes the boot execution process onto the boot loader/manager such as GRUB2 on newer linux installs. For more information on this, read this very informative post.
The 2nd piece of information is to understand that the ISO downloads for Linux OSes are designed to be installed on a disk (CD/DVD/USB) and not for a partition. These ISOs need to be modified using a small tool which can be found on the syslinux-utils package, called isohybrid. The ISO modification for installation on a partition is done with the --partok
flag. I found this information from this post which describes the exact same issue.
I am not sure how the --partok
magic works, I searched for some explanation but could not find any.
In summary, here is what I did to get my live PureOS install to boot from a usb partition,
- Partitioned my USB using GNOME disk, I initially formatted the disk using MBR/DOS. I created a 4GB partition (FAT32) followed by a an ext4 linux partition in the remaining space for my backups.
- Next I modified the ISO file I downloaded to make it bootable from the partition. To do this I had to install the syslinux-util from my repo
sudo apt-get install syslinux-util
in which the isohydrid tool resides. I then modified the ISO file,isohybrid --partok pureos.ISO
- I used dd to copy this ISO to the above partition. You can get the partition device from the GNOME disk details.
dd if=pureos.ISO of=/dev/sdb1 bs=1M
.
- from GNOME disk I edited the partiton and checked the Bootable option which installs the required book record.
I was now able to boot from the USB key into the live CD and use it as a recovery soluton while storing my system backups on the other partition.
add a comment |
I found an alternative way which is more straightforward. There are 2 important pieces of information one needs to understand about why this works. The first is about the boot process and how the initial power on self test (executed by the BIOS) looks for a boot record on the first boot sector of the devices attached. This is a small file which basically passes the boot execution process onto the boot loader/manager such as GRUB2 on newer linux installs. For more information on this, read this very informative post.
The 2nd piece of information is to understand that the ISO downloads for Linux OSes are designed to be installed on a disk (CD/DVD/USB) and not for a partition. These ISOs need to be modified using a small tool which can be found on the syslinux-utils package, called isohybrid. The ISO modification for installation on a partition is done with the --partok
flag. I found this information from this post which describes the exact same issue.
I am not sure how the --partok
magic works, I searched for some explanation but could not find any.
In summary, here is what I did to get my live PureOS install to boot from a usb partition,
- Partitioned my USB using GNOME disk, I initially formatted the disk using MBR/DOS. I created a 4GB partition (FAT32) followed by a an ext4 linux partition in the remaining space for my backups.
- Next I modified the ISO file I downloaded to make it bootable from the partition. To do this I had to install the syslinux-util from my repo
sudo apt-get install syslinux-util
in which the isohydrid tool resides. I then modified the ISO file,isohybrid --partok pureos.ISO
- I used dd to copy this ISO to the above partition. You can get the partition device from the GNOME disk details.
dd if=pureos.ISO of=/dev/sdb1 bs=1M
.
- from GNOME disk I edited the partiton and checked the Bootable option which installs the required book record.
I was now able to boot from the USB key into the live CD and use it as a recovery soluton while storing my system backups on the other partition.
add a comment |
I found an alternative way which is more straightforward. There are 2 important pieces of information one needs to understand about why this works. The first is about the boot process and how the initial power on self test (executed by the BIOS) looks for a boot record on the first boot sector of the devices attached. This is a small file which basically passes the boot execution process onto the boot loader/manager such as GRUB2 on newer linux installs. For more information on this, read this very informative post.
The 2nd piece of information is to understand that the ISO downloads for Linux OSes are designed to be installed on a disk (CD/DVD/USB) and not for a partition. These ISOs need to be modified using a small tool which can be found on the syslinux-utils package, called isohybrid. The ISO modification for installation on a partition is done with the --partok
flag. I found this information from this post which describes the exact same issue.
I am not sure how the --partok
magic works, I searched for some explanation but could not find any.
In summary, here is what I did to get my live PureOS install to boot from a usb partition,
- Partitioned my USB using GNOME disk, I initially formatted the disk using MBR/DOS. I created a 4GB partition (FAT32) followed by a an ext4 linux partition in the remaining space for my backups.
- Next I modified the ISO file I downloaded to make it bootable from the partition. To do this I had to install the syslinux-util from my repo
sudo apt-get install syslinux-util
in which the isohydrid tool resides. I then modified the ISO file,isohybrid --partok pureos.ISO
- I used dd to copy this ISO to the above partition. You can get the partition device from the GNOME disk details.
dd if=pureos.ISO of=/dev/sdb1 bs=1M
.
- from GNOME disk I edited the partiton and checked the Bootable option which installs the required book record.
I was now able to boot from the USB key into the live CD and use it as a recovery soluton while storing my system backups on the other partition.
I found an alternative way which is more straightforward. There are 2 important pieces of information one needs to understand about why this works. The first is about the boot process and how the initial power on self test (executed by the BIOS) looks for a boot record on the first boot sector of the devices attached. This is a small file which basically passes the boot execution process onto the boot loader/manager such as GRUB2 on newer linux installs. For more information on this, read this very informative post.
The 2nd piece of information is to understand that the ISO downloads for Linux OSes are designed to be installed on a disk (CD/DVD/USB) and not for a partition. These ISOs need to be modified using a small tool which can be found on the syslinux-utils package, called isohybrid. The ISO modification for installation on a partition is done with the --partok
flag. I found this information from this post which describes the exact same issue.
I am not sure how the --partok
magic works, I searched for some explanation but could not find any.
In summary, here is what I did to get my live PureOS install to boot from a usb partition,
- Partitioned my USB using GNOME disk, I initially formatted the disk using MBR/DOS. I created a 4GB partition (FAT32) followed by a an ext4 linux partition in the remaining space for my backups.
- Next I modified the ISO file I downloaded to make it bootable from the partition. To do this I had to install the syslinux-util from my repo
sudo apt-get install syslinux-util
in which the isohydrid tool resides. I then modified the ISO file,isohybrid --partok pureos.ISO
- I used dd to copy this ISO to the above partition. You can get the partition device from the GNOME disk details.
dd if=pureos.ISO of=/dev/sdb1 bs=1M
.
- from GNOME disk I edited the partiton and checked the Bootable option which installs the required book record.
I was now able to boot from the USB key into the live CD and use it as a recovery soluton while storing my system backups on the other partition.
edited Aug 11 '18 at 16:23
mook765
4,14921332
4,14921332
answered Oct 31 '17 at 7:55
AurovrataAurovrata
17113
17113
add a comment |
add a comment |
The simple answer is yes, but you can go simpler!
make sure you an ISO of the Linux flavour you want on the drive and UNetbootin, available from here: http://unetbootin.sourceforge.net/
Make sure you select Hard Disk install from the drop down and to copy all your data from the drive before starting. You should be able to use the rest of the space for your other purposes!
That's not really what I want to do, the reason I want to separate partitions is to have a clean storage space, without all the folders from the ubuntu installation disk. Just having them hidden wouldn't work since I use the USB-drive on both Windows and Ubuntu.
– MrVaykadji
Feb 19 '14 at 20:19
Also, Unetbootin will only allow me to boot the live in English, and I want to use my native language.
– MrVaykadji
Feb 19 '14 at 20:20
Once unetbootin is installed, you can use a partition manager to shrink the partition and add one for your own files after it (gparted would do it perfectly) As for the language change, you can edit the bootloader to to add kernel parameters, see <help.ubuntu.com/lts/installation-guide/powerpc/boot-parms.html> in regard to debian-installer/language (language), debian-installer/country (country), debian-installer/locale (locale) to force your required locale
– Viperfang
Feb 19 '14 at 20:32
yes, but would I still be able to boot my USB key for a live-session ?
– MrVaykadji
Feb 19 '14 at 21:19
add a comment |
The simple answer is yes, but you can go simpler!
make sure you an ISO of the Linux flavour you want on the drive and UNetbootin, available from here: http://unetbootin.sourceforge.net/
Make sure you select Hard Disk install from the drop down and to copy all your data from the drive before starting. You should be able to use the rest of the space for your other purposes!
That's not really what I want to do, the reason I want to separate partitions is to have a clean storage space, without all the folders from the ubuntu installation disk. Just having them hidden wouldn't work since I use the USB-drive on both Windows and Ubuntu.
– MrVaykadji
Feb 19 '14 at 20:19
Also, Unetbootin will only allow me to boot the live in English, and I want to use my native language.
– MrVaykadji
Feb 19 '14 at 20:20
Once unetbootin is installed, you can use a partition manager to shrink the partition and add one for your own files after it (gparted would do it perfectly) As for the language change, you can edit the bootloader to to add kernel parameters, see <help.ubuntu.com/lts/installation-guide/powerpc/boot-parms.html> in regard to debian-installer/language (language), debian-installer/country (country), debian-installer/locale (locale) to force your required locale
– Viperfang
Feb 19 '14 at 20:32
yes, but would I still be able to boot my USB key for a live-session ?
– MrVaykadji
Feb 19 '14 at 21:19
add a comment |
The simple answer is yes, but you can go simpler!
make sure you an ISO of the Linux flavour you want on the drive and UNetbootin, available from here: http://unetbootin.sourceforge.net/
Make sure you select Hard Disk install from the drop down and to copy all your data from the drive before starting. You should be able to use the rest of the space for your other purposes!
The simple answer is yes, but you can go simpler!
make sure you an ISO of the Linux flavour you want on the drive and UNetbootin, available from here: http://unetbootin.sourceforge.net/
Make sure you select Hard Disk install from the drop down and to copy all your data from the drive before starting. You should be able to use the rest of the space for your other purposes!
answered Feb 19 '14 at 20:02
ViperfangViperfang
38132
38132
That's not really what I want to do, the reason I want to separate partitions is to have a clean storage space, without all the folders from the ubuntu installation disk. Just having them hidden wouldn't work since I use the USB-drive on both Windows and Ubuntu.
– MrVaykadji
Feb 19 '14 at 20:19
Also, Unetbootin will only allow me to boot the live in English, and I want to use my native language.
– MrVaykadji
Feb 19 '14 at 20:20
Once unetbootin is installed, you can use a partition manager to shrink the partition and add one for your own files after it (gparted would do it perfectly) As for the language change, you can edit the bootloader to to add kernel parameters, see <help.ubuntu.com/lts/installation-guide/powerpc/boot-parms.html> in regard to debian-installer/language (language), debian-installer/country (country), debian-installer/locale (locale) to force your required locale
– Viperfang
Feb 19 '14 at 20:32
yes, but would I still be able to boot my USB key for a live-session ?
– MrVaykadji
Feb 19 '14 at 21:19
add a comment |
That's not really what I want to do, the reason I want to separate partitions is to have a clean storage space, without all the folders from the ubuntu installation disk. Just having them hidden wouldn't work since I use the USB-drive on both Windows and Ubuntu.
– MrVaykadji
Feb 19 '14 at 20:19
Also, Unetbootin will only allow me to boot the live in English, and I want to use my native language.
– MrVaykadji
Feb 19 '14 at 20:20
Once unetbootin is installed, you can use a partition manager to shrink the partition and add one for your own files after it (gparted would do it perfectly) As for the language change, you can edit the bootloader to to add kernel parameters, see <help.ubuntu.com/lts/installation-guide/powerpc/boot-parms.html> in regard to debian-installer/language (language), debian-installer/country (country), debian-installer/locale (locale) to force your required locale
– Viperfang
Feb 19 '14 at 20:32
yes, but would I still be able to boot my USB key for a live-session ?
– MrVaykadji
Feb 19 '14 at 21:19
That's not really what I want to do, the reason I want to separate partitions is to have a clean storage space, without all the folders from the ubuntu installation disk. Just having them hidden wouldn't work since I use the USB-drive on both Windows and Ubuntu.
– MrVaykadji
Feb 19 '14 at 20:19
That's not really what I want to do, the reason I want to separate partitions is to have a clean storage space, without all the folders from the ubuntu installation disk. Just having them hidden wouldn't work since I use the USB-drive on both Windows and Ubuntu.
– MrVaykadji
Feb 19 '14 at 20:19
Also, Unetbootin will only allow me to boot the live in English, and I want to use my native language.
– MrVaykadji
Feb 19 '14 at 20:20
Also, Unetbootin will only allow me to boot the live in English, and I want to use my native language.
– MrVaykadji
Feb 19 '14 at 20:20
Once unetbootin is installed, you can use a partition manager to shrink the partition and add one for your own files after it (gparted would do it perfectly) As for the language change, you can edit the bootloader to to add kernel parameters, see <help.ubuntu.com/lts/installation-guide/powerpc/boot-parms.html> in regard to debian-installer/language (language), debian-installer/country (country), debian-installer/locale (locale) to force your required locale
– Viperfang
Feb 19 '14 at 20:32
Once unetbootin is installed, you can use a partition manager to shrink the partition and add one for your own files after it (gparted would do it perfectly) As for the language change, you can edit the bootloader to to add kernel parameters, see <help.ubuntu.com/lts/installation-guide/powerpc/boot-parms.html> in regard to debian-installer/language (language), debian-installer/country (country), debian-installer/locale (locale) to force your required locale
– Viperfang
Feb 19 '14 at 20:32
yes, but would I still be able to boot my USB key for a live-session ?
– MrVaykadji
Feb 19 '14 at 21:19
yes, but would I still be able to boot my USB key for a live-session ?
– MrVaykadji
Feb 19 '14 at 21:19
add a comment |
Persistent live drive
You can use mkusb to create a persistent live drive. It will create 5 partitions. See this link,
help.ubuntu.com/community/mkusb
Partition #1 has the label 'usbdata' and the file system NTFS, which can be used by both Ubuntu and Windows in order to store files and transfer files between computers.
The other partitions belong to the Ubuntu persistent live system.
See this link for more details,
help.ubuntu.com/community/mkusb/persistent#Partitions
partition: (NTFS) usbdata for storage and transfer of files
partition: GPT: bios_grub flag for booting in BIOS mode; MSDOS: extended partition
partition: (FAT32) boot partition
partition: (ISO 9660) cloned iso file
partition: (ext4) casper-rw or live-rw or persistence
Details
Details about the partitions from and after making the persistent live system:
...
parted -s "/dev/sdd" print
Model: SanDisk Extreme (scsi)
Disk /dev/sdd: 16,0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
2 1049kB 2097kB 1049kB primary bios_grub
3 2097kB 258MB 256MB fat32 primary boot, esp
4 258MB 1791MB 1533MB primary
5 1791MB 8902MB 7111MB ext2 primary
1 8902MB 16,0GB 7111MB ntfs primary msftdata
lsblk -o MODEL,NAME,FSTYPE,LABEL,MOUNTPOINT,SIZE "/dev/sdd"
MODEL NAME FSTYPE LABEL MOUNTPOINT SIZE
Extreme sdd 14,9G
|-sdd1 ntfs usbdata 6,6G
|-sdd2 1M
|-sdd3 vfat usbboot 244M
|-sdd4 iso9660 Ubuntu 16.04.1 LTS amd64 1,4G
`-sdd5 ext4 casper-rw 6,6G
</pre>
Done :-)
The target device is ready to use.
'ubuntu-16.04.1-desktop-amd64.iso'
was installed
gparted
in 16.04 LTS not recognizing iso 9660 file system and bios_grub boot image:
gparted
in 17.10 seeing iso 9660 file system and bios_grub boot image:
add a comment |
Persistent live drive
You can use mkusb to create a persistent live drive. It will create 5 partitions. See this link,
help.ubuntu.com/community/mkusb
Partition #1 has the label 'usbdata' and the file system NTFS, which can be used by both Ubuntu and Windows in order to store files and transfer files between computers.
The other partitions belong to the Ubuntu persistent live system.
See this link for more details,
help.ubuntu.com/community/mkusb/persistent#Partitions
partition: (NTFS) usbdata for storage and transfer of files
partition: GPT: bios_grub flag for booting in BIOS mode; MSDOS: extended partition
partition: (FAT32) boot partition
partition: (ISO 9660) cloned iso file
partition: (ext4) casper-rw or live-rw or persistence
Details
Details about the partitions from and after making the persistent live system:
...
parted -s "/dev/sdd" print
Model: SanDisk Extreme (scsi)
Disk /dev/sdd: 16,0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
2 1049kB 2097kB 1049kB primary bios_grub
3 2097kB 258MB 256MB fat32 primary boot, esp
4 258MB 1791MB 1533MB primary
5 1791MB 8902MB 7111MB ext2 primary
1 8902MB 16,0GB 7111MB ntfs primary msftdata
lsblk -o MODEL,NAME,FSTYPE,LABEL,MOUNTPOINT,SIZE "/dev/sdd"
MODEL NAME FSTYPE LABEL MOUNTPOINT SIZE
Extreme sdd 14,9G
|-sdd1 ntfs usbdata 6,6G
|-sdd2 1M
|-sdd3 vfat usbboot 244M
|-sdd4 iso9660 Ubuntu 16.04.1 LTS amd64 1,4G
`-sdd5 ext4 casper-rw 6,6G
</pre>
Done :-)
The target device is ready to use.
'ubuntu-16.04.1-desktop-amd64.iso'
was installed
gparted
in 16.04 LTS not recognizing iso 9660 file system and bios_grub boot image:
gparted
in 17.10 seeing iso 9660 file system and bios_grub boot image:
add a comment |
Persistent live drive
You can use mkusb to create a persistent live drive. It will create 5 partitions. See this link,
help.ubuntu.com/community/mkusb
Partition #1 has the label 'usbdata' and the file system NTFS, which can be used by both Ubuntu and Windows in order to store files and transfer files between computers.
The other partitions belong to the Ubuntu persistent live system.
See this link for more details,
help.ubuntu.com/community/mkusb/persistent#Partitions
partition: (NTFS) usbdata for storage and transfer of files
partition: GPT: bios_grub flag for booting in BIOS mode; MSDOS: extended partition
partition: (FAT32) boot partition
partition: (ISO 9660) cloned iso file
partition: (ext4) casper-rw or live-rw or persistence
Details
Details about the partitions from and after making the persistent live system:
...
parted -s "/dev/sdd" print
Model: SanDisk Extreme (scsi)
Disk /dev/sdd: 16,0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
2 1049kB 2097kB 1049kB primary bios_grub
3 2097kB 258MB 256MB fat32 primary boot, esp
4 258MB 1791MB 1533MB primary
5 1791MB 8902MB 7111MB ext2 primary
1 8902MB 16,0GB 7111MB ntfs primary msftdata
lsblk -o MODEL,NAME,FSTYPE,LABEL,MOUNTPOINT,SIZE "/dev/sdd"
MODEL NAME FSTYPE LABEL MOUNTPOINT SIZE
Extreme sdd 14,9G
|-sdd1 ntfs usbdata 6,6G
|-sdd2 1M
|-sdd3 vfat usbboot 244M
|-sdd4 iso9660 Ubuntu 16.04.1 LTS amd64 1,4G
`-sdd5 ext4 casper-rw 6,6G
</pre>
Done :-)
The target device is ready to use.
'ubuntu-16.04.1-desktop-amd64.iso'
was installed
gparted
in 16.04 LTS not recognizing iso 9660 file system and bios_grub boot image:
gparted
in 17.10 seeing iso 9660 file system and bios_grub boot image:
Persistent live drive
You can use mkusb to create a persistent live drive. It will create 5 partitions. See this link,
help.ubuntu.com/community/mkusb
Partition #1 has the label 'usbdata' and the file system NTFS, which can be used by both Ubuntu and Windows in order to store files and transfer files between computers.
The other partitions belong to the Ubuntu persistent live system.
See this link for more details,
help.ubuntu.com/community/mkusb/persistent#Partitions
partition: (NTFS) usbdata for storage and transfer of files
partition: GPT: bios_grub flag for booting in BIOS mode; MSDOS: extended partition
partition: (FAT32) boot partition
partition: (ISO 9660) cloned iso file
partition: (ext4) casper-rw or live-rw or persistence
Details
Details about the partitions from and after making the persistent live system:
...
parted -s "/dev/sdd" print
Model: SanDisk Extreme (scsi)
Disk /dev/sdd: 16,0GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
2 1049kB 2097kB 1049kB primary bios_grub
3 2097kB 258MB 256MB fat32 primary boot, esp
4 258MB 1791MB 1533MB primary
5 1791MB 8902MB 7111MB ext2 primary
1 8902MB 16,0GB 7111MB ntfs primary msftdata
lsblk -o MODEL,NAME,FSTYPE,LABEL,MOUNTPOINT,SIZE "/dev/sdd"
MODEL NAME FSTYPE LABEL MOUNTPOINT SIZE
Extreme sdd 14,9G
|-sdd1 ntfs usbdata 6,6G
|-sdd2 1M
|-sdd3 vfat usbboot 244M
|-sdd4 iso9660 Ubuntu 16.04.1 LTS amd64 1,4G
`-sdd5 ext4 casper-rw 6,6G
</pre>
Done :-)
The target device is ready to use.
'ubuntu-16.04.1-desktop-amd64.iso'
was installed
gparted
in 16.04 LTS not recognizing iso 9660 file system and bios_grub boot image:
gparted
in 17.10 seeing iso 9660 file system and bios_grub boot image:
answered Oct 31 '17 at 9:28
sudodussudodus
24.2k32875
24.2k32875
add a comment |
add a comment |
- You want to preserve the main part of your USB as FAT32 storage 14GB
- You want LiveUSB part in Ext4 2GB
Then the layout of your USB follow:
sdb1 14GB Fat32 storage and EFI folder
sdb2 2GB Ext4 LiveUSB
- You have to create the Fat32 part fist to be seen under Windows, as without many tweak, Windows only mount the 1st partition of your USB
- This Fat32 partition also hold EFI folder to boot your LiveUSB part
- If you want the LiveUSB partition sdb2 on Ext4. By default, the built-in bootx64.efi of the LiveUSB will not boot an Ext4 partition.
So I have made a tweaked bootx64.efi. You just copy the file to sdb1/EFI/boot/. And it will boot your Ext4 LiveUSB part. All of my detail here https://github.com/sonvirgo/Ext4-LiveUSB
Very interesting. Will this method allow use of a casper-rw partition?
– C.S.Cameron
Aug 11 '18 at 18:11
@C.S.Cameron Yet, sure. You can add an additional ext4 partition for casper-rw. As far as this still hold:source $prefix/x86_64-efi/grub.cfg
so that bootx64.efi can find grub's partition. Update my answer with Windows 10 1703+, you are free to make multiple partitions in any order. All are mountable under 1703+
– Son Nguyen
Aug 16 '18 at 2:45
add a comment |
- You want to preserve the main part of your USB as FAT32 storage 14GB
- You want LiveUSB part in Ext4 2GB
Then the layout of your USB follow:
sdb1 14GB Fat32 storage and EFI folder
sdb2 2GB Ext4 LiveUSB
- You have to create the Fat32 part fist to be seen under Windows, as without many tweak, Windows only mount the 1st partition of your USB
- This Fat32 partition also hold EFI folder to boot your LiveUSB part
- If you want the LiveUSB partition sdb2 on Ext4. By default, the built-in bootx64.efi of the LiveUSB will not boot an Ext4 partition.
So I have made a tweaked bootx64.efi. You just copy the file to sdb1/EFI/boot/. And it will boot your Ext4 LiveUSB part. All of my detail here https://github.com/sonvirgo/Ext4-LiveUSB
Very interesting. Will this method allow use of a casper-rw partition?
– C.S.Cameron
Aug 11 '18 at 18:11
@C.S.Cameron Yet, sure. You can add an additional ext4 partition for casper-rw. As far as this still hold:source $prefix/x86_64-efi/grub.cfg
so that bootx64.efi can find grub's partition. Update my answer with Windows 10 1703+, you are free to make multiple partitions in any order. All are mountable under 1703+
– Son Nguyen
Aug 16 '18 at 2:45
add a comment |
- You want to preserve the main part of your USB as FAT32 storage 14GB
- You want LiveUSB part in Ext4 2GB
Then the layout of your USB follow:
sdb1 14GB Fat32 storage and EFI folder
sdb2 2GB Ext4 LiveUSB
- You have to create the Fat32 part fist to be seen under Windows, as without many tweak, Windows only mount the 1st partition of your USB
- This Fat32 partition also hold EFI folder to boot your LiveUSB part
- If you want the LiveUSB partition sdb2 on Ext4. By default, the built-in bootx64.efi of the LiveUSB will not boot an Ext4 partition.
So I have made a tweaked bootx64.efi. You just copy the file to sdb1/EFI/boot/. And it will boot your Ext4 LiveUSB part. All of my detail here https://github.com/sonvirgo/Ext4-LiveUSB
- You want to preserve the main part of your USB as FAT32 storage 14GB
- You want LiveUSB part in Ext4 2GB
Then the layout of your USB follow:
sdb1 14GB Fat32 storage and EFI folder
sdb2 2GB Ext4 LiveUSB
- You have to create the Fat32 part fist to be seen under Windows, as without many tweak, Windows only mount the 1st partition of your USB
- This Fat32 partition also hold EFI folder to boot your LiveUSB part
- If you want the LiveUSB partition sdb2 on Ext4. By default, the built-in bootx64.efi of the LiveUSB will not boot an Ext4 partition.
So I have made a tweaked bootx64.efi. You just copy the file to sdb1/EFI/boot/. And it will boot your Ext4 LiveUSB part. All of my detail here https://github.com/sonvirgo/Ext4-LiveUSB
answered Dec 19 '17 at 3:51
Son NguyenSon Nguyen
111
111
Very interesting. Will this method allow use of a casper-rw partition?
– C.S.Cameron
Aug 11 '18 at 18:11
@C.S.Cameron Yet, sure. You can add an additional ext4 partition for casper-rw. As far as this still hold:source $prefix/x86_64-efi/grub.cfg
so that bootx64.efi can find grub's partition. Update my answer with Windows 10 1703+, you are free to make multiple partitions in any order. All are mountable under 1703+
– Son Nguyen
Aug 16 '18 at 2:45
add a comment |
Very interesting. Will this method allow use of a casper-rw partition?
– C.S.Cameron
Aug 11 '18 at 18:11
@C.S.Cameron Yet, sure. You can add an additional ext4 partition for casper-rw. As far as this still hold:source $prefix/x86_64-efi/grub.cfg
so that bootx64.efi can find grub's partition. Update my answer with Windows 10 1703+, you are free to make multiple partitions in any order. All are mountable under 1703+
– Son Nguyen
Aug 16 '18 at 2:45
Very interesting. Will this method allow use of a casper-rw partition?
– C.S.Cameron
Aug 11 '18 at 18:11
Very interesting. Will this method allow use of a casper-rw partition?
– C.S.Cameron
Aug 11 '18 at 18:11
@C.S.Cameron Yet, sure. You can add an additional ext4 partition for casper-rw. As far as this still hold:
source $prefix/x86_64-efi/grub.cfg
so that bootx64.efi can find grub's partition. Update my answer with Windows 10 1703+, you are free to make multiple partitions in any order. All are mountable under 1703+– Son Nguyen
Aug 16 '18 at 2:45
@C.S.Cameron Yet, sure. You can add an additional ext4 partition for casper-rw. As far as this still hold:
source $prefix/x86_64-efi/grub.cfg
so that bootx64.efi can find grub's partition. Update my answer with Windows 10 1703+, you are free to make multiple partitions in any order. All are mountable under 1703+– Son Nguyen
Aug 16 '18 at 2:45
add a comment |
This should be easy to do. However, be warned in advanced that Windows will only be able to see the first partition (/dev/sdb1), the second partition will be invisible (I don't know why). Therefore, I would recommend the general-purpose storage partition be the first one, and the LiveUSB partition be the second one.
If after doing this, you can't get the key to boot, you should be able to set the Boot flag using GParted.
Please note: although I've successfully done this before, I've never tested doing something like this on a UEFI-based system, let alone something that uses Secure Boot.
I'm afraid I'll have to argue that point. I, myself have a flash drive which I use both as a LiveUSB version of Ubuntu, and for general storage. My first partition is an NTFS partition, which works perfectly on both XP and 7. My second partition is a FAT32 partition, which contains a live version of Ubuntu. I can't even see this partition from Windows, even from the disk manager (diskmgmt.msc). However, i can boot from it, and read from/write to it from Ubuntu. See the 4th paragraphHERE.
– TSJNachos117
Feb 23 '14 at 5:28
Apologies for the down-vote. After reading your comment I realized my test Ubuntu Live boot partition was not first. If you make a small edit I will give a well deserved up-vote.
– conman253
Feb 26 '14 at 4:38
What edit is that?
– TSJNachos117
Feb 27 '14 at 5:53
The forum won't let me change my down-vote until your answer is edited. I tried just adding <p> but no luck. You could just remove them.
– conman253
Feb 27 '14 at 18:11
Nowadays Windows 10 allows access to multiple "Windows FS type" partitions. Fat32, NTFS, UDF.
– C.S.Cameron
Aug 11 '18 at 18:14
add a comment |
This should be easy to do. However, be warned in advanced that Windows will only be able to see the first partition (/dev/sdb1), the second partition will be invisible (I don't know why). Therefore, I would recommend the general-purpose storage partition be the first one, and the LiveUSB partition be the second one.
If after doing this, you can't get the key to boot, you should be able to set the Boot flag using GParted.
Please note: although I've successfully done this before, I've never tested doing something like this on a UEFI-based system, let alone something that uses Secure Boot.
I'm afraid I'll have to argue that point. I, myself have a flash drive which I use both as a LiveUSB version of Ubuntu, and for general storage. My first partition is an NTFS partition, which works perfectly on both XP and 7. My second partition is a FAT32 partition, which contains a live version of Ubuntu. I can't even see this partition from Windows, even from the disk manager (diskmgmt.msc). However, i can boot from it, and read from/write to it from Ubuntu. See the 4th paragraphHERE.
– TSJNachos117
Feb 23 '14 at 5:28
Apologies for the down-vote. After reading your comment I realized my test Ubuntu Live boot partition was not first. If you make a small edit I will give a well deserved up-vote.
– conman253
Feb 26 '14 at 4:38
What edit is that?
– TSJNachos117
Feb 27 '14 at 5:53
The forum won't let me change my down-vote until your answer is edited. I tried just adding <p> but no luck. You could just remove them.
– conman253
Feb 27 '14 at 18:11
Nowadays Windows 10 allows access to multiple "Windows FS type" partitions. Fat32, NTFS, UDF.
– C.S.Cameron
Aug 11 '18 at 18:14
add a comment |
This should be easy to do. However, be warned in advanced that Windows will only be able to see the first partition (/dev/sdb1), the second partition will be invisible (I don't know why). Therefore, I would recommend the general-purpose storage partition be the first one, and the LiveUSB partition be the second one.
If after doing this, you can't get the key to boot, you should be able to set the Boot flag using GParted.
Please note: although I've successfully done this before, I've never tested doing something like this on a UEFI-based system, let alone something that uses Secure Boot.
This should be easy to do. However, be warned in advanced that Windows will only be able to see the first partition (/dev/sdb1), the second partition will be invisible (I don't know why). Therefore, I would recommend the general-purpose storage partition be the first one, and the LiveUSB partition be the second one.
If after doing this, you can't get the key to boot, you should be able to set the Boot flag using GParted.
Please note: although I've successfully done this before, I've never tested doing something like this on a UEFI-based system, let alone something that uses Secure Boot.
answered Feb 20 '14 at 1:53
TSJNachos117TSJNachos117
8722915
8722915
I'm afraid I'll have to argue that point. I, myself have a flash drive which I use both as a LiveUSB version of Ubuntu, and for general storage. My first partition is an NTFS partition, which works perfectly on both XP and 7. My second partition is a FAT32 partition, which contains a live version of Ubuntu. I can't even see this partition from Windows, even from the disk manager (diskmgmt.msc). However, i can boot from it, and read from/write to it from Ubuntu. See the 4th paragraphHERE.
– TSJNachos117
Feb 23 '14 at 5:28
Apologies for the down-vote. After reading your comment I realized my test Ubuntu Live boot partition was not first. If you make a small edit I will give a well deserved up-vote.
– conman253
Feb 26 '14 at 4:38
What edit is that?
– TSJNachos117
Feb 27 '14 at 5:53
The forum won't let me change my down-vote until your answer is edited. I tried just adding <p> but no luck. You could just remove them.
– conman253
Feb 27 '14 at 18:11
Nowadays Windows 10 allows access to multiple "Windows FS type" partitions. Fat32, NTFS, UDF.
– C.S.Cameron
Aug 11 '18 at 18:14
add a comment |
I'm afraid I'll have to argue that point. I, myself have a flash drive which I use both as a LiveUSB version of Ubuntu, and for general storage. My first partition is an NTFS partition, which works perfectly on both XP and 7. My second partition is a FAT32 partition, which contains a live version of Ubuntu. I can't even see this partition from Windows, even from the disk manager (diskmgmt.msc). However, i can boot from it, and read from/write to it from Ubuntu. See the 4th paragraphHERE.
– TSJNachos117
Feb 23 '14 at 5:28
Apologies for the down-vote. After reading your comment I realized my test Ubuntu Live boot partition was not first. If you make a small edit I will give a well deserved up-vote.
– conman253
Feb 26 '14 at 4:38
What edit is that?
– TSJNachos117
Feb 27 '14 at 5:53
The forum won't let me change my down-vote until your answer is edited. I tried just adding <p> but no luck. You could just remove them.
– conman253
Feb 27 '14 at 18:11
Nowadays Windows 10 allows access to multiple "Windows FS type" partitions. Fat32, NTFS, UDF.
– C.S.Cameron
Aug 11 '18 at 18:14
I'm afraid I'll have to argue that point. I, myself have a flash drive which I use both as a LiveUSB version of Ubuntu, and for general storage. My first partition is an NTFS partition, which works perfectly on both XP and 7. My second partition is a FAT32 partition, which contains a live version of Ubuntu. I can't even see this partition from Windows, even from the disk manager (diskmgmt.msc). However, i can boot from it, and read from/write to it from Ubuntu. See the 4th paragraphHERE.
– TSJNachos117
Feb 23 '14 at 5:28
I'm afraid I'll have to argue that point. I, myself have a flash drive which I use both as a LiveUSB version of Ubuntu, and for general storage. My first partition is an NTFS partition, which works perfectly on both XP and 7. My second partition is a FAT32 partition, which contains a live version of Ubuntu. I can't even see this partition from Windows, even from the disk manager (diskmgmt.msc). However, i can boot from it, and read from/write to it from Ubuntu. See the 4th paragraphHERE.
– TSJNachos117
Feb 23 '14 at 5:28
Apologies for the down-vote. After reading your comment I realized my test Ubuntu Live boot partition was not first. If you make a small edit I will give a well deserved up-vote.
– conman253
Feb 26 '14 at 4:38
Apologies for the down-vote. After reading your comment I realized my test Ubuntu Live boot partition was not first. If you make a small edit I will give a well deserved up-vote.
– conman253
Feb 26 '14 at 4:38
What edit is that?
– TSJNachos117
Feb 27 '14 at 5:53
What edit is that?
– TSJNachos117
Feb 27 '14 at 5:53
The forum won't let me change my down-vote until your answer is edited. I tried just adding <p> but no luck. You could just remove them.
– conman253
Feb 27 '14 at 18:11
The forum won't let me change my down-vote until your answer is edited. I tried just adding <p> but no luck. You could just remove them.
– conman253
Feb 27 '14 at 18:11
Nowadays Windows 10 allows access to multiple "Windows FS type" partitions. Fat32, NTFS, UDF.
– C.S.Cameron
Aug 11 '18 at 18:14
Nowadays Windows 10 allows access to multiple "Windows FS type" partitions. Fat32, NTFS, UDF.
– C.S.Cameron
Aug 11 '18 at 18:14
add a comment |
An easy solution:
Use KDE Partition Manager to delete all partitions and create a
2,048
MB primary partition, FAT32.Use unetbootin to write the ISO (Ubuntu 18.04 is about that size, 2GB). Don't worry that it appears to only write to
/dev/sda
, not a particular partition.Use Kde Partition Manager again to allocate the remaining space to your data partition. I chose the NTFS file system for interoperability with Windows.
add a comment |
An easy solution:
Use KDE Partition Manager to delete all partitions and create a
2,048
MB primary partition, FAT32.Use unetbootin to write the ISO (Ubuntu 18.04 is about that size, 2GB). Don't worry that it appears to only write to
/dev/sda
, not a particular partition.Use Kde Partition Manager again to allocate the remaining space to your data partition. I chose the NTFS file system for interoperability with Windows.
add a comment |
An easy solution:
Use KDE Partition Manager to delete all partitions and create a
2,048
MB primary partition, FAT32.Use unetbootin to write the ISO (Ubuntu 18.04 is about that size, 2GB). Don't worry that it appears to only write to
/dev/sda
, not a particular partition.Use Kde Partition Manager again to allocate the remaining space to your data partition. I chose the NTFS file system for interoperability with Windows.
An easy solution:
Use KDE Partition Manager to delete all partitions and create a
2,048
MB primary partition, FAT32.Use unetbootin to write the ISO (Ubuntu 18.04 is about that size, 2GB). Don't worry that it appears to only write to
/dev/sda
, not a particular partition.Use Kde Partition Manager again to allocate the remaining space to your data partition. I chose the NTFS file system for interoperability with Windows.
answered 16 mins ago
Dan DascalescuDan Dascalescu
1,10021637
1,10021637
add a comment |
add a comment |
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f423300%2flive-usb-on-a-2-partition-usb-drive%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown