Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.debian.user > #204325 > unrolled thread
| Started by | MENGUAL Jean-Philippe <mengualjeanphi@free.fr> |
|---|---|
| First post | 2019-01-11 21:50 +0100 |
| Last post | 2019-05-19 11:10 +0200 |
| Articles | 7 — 5 participants |
Back to article view | Back to linux.debian.user
Setting a USB for multi usages MENGUAL Jean-Philippe <mengualjeanphi@free.fr> - 2019-01-11 21:50 +0100
Re: Setting a USB for multi usages Joel Wirāmu Pauling <aenertia@aenertia.net> - 2019-01-11 23:00 +0100
Re: Setting a USB for multi usages "Thomas Schmitt" <scdbackup@gmx.net> - 2019-01-11 23:10 +0100
Re: Setting a USB for multi usages MENGUAL Jean-Philippe <mengualjeanphi@free.fr> - 2019-01-12 10:20 +0100
Re: Setting a USB for multi usages "Thomas Schmitt" <scdbackup@gmx.net> - 2019-01-12 13:00 +0100
Re: Setting a USB for multi usages Richard Owlett <rowlett@cloud85.net> - 2019-01-12 16:50 +0100
Re: Setting a USB for multi usages Andrei POPESCU <andreimpopescu@gmail.com> - 2019-05-19 11:10 +0200
| From | MENGUAL Jean-Philippe <mengualjeanphi@free.fr> |
|---|---|
| Date | 2019-01-11 21:50 +0100 |
| Subject | Setting a USB for multi usages |
| Message-ID | <xfbUC-DV-5@gated-at.bofh.it> |
[Multipart message — attachments visible in raw view] — view raw
Hi, My purpose is having a USB stick splitted in 2 parts: 1. MBR + partitions: a Debian installer from an ISO 2. A blank partition to install data or whatver While I know to "burn" an iso on a key via dd, how can I do to have a clean installer but using key for other usages? Thanks very much regards -- signature_jp_2 Logo Hypra JEAN-PHILIPPE MENGUAL DIRECTEUR TECHNIQUE ET QUALITÉ 102, rue des poissonniers, 75018, Paris Tel : +331 84 73 06 61 <tel:+33184730661> Mob : +336 76 34 93 37 <tel:+33676349337> jpmengual@hypra.fr <mailto:jpmengual@hypra.fr> www.hypra.fr <http://www.hypra.fr/> Facebook Hypra <https://www.facebook.com/hyprasoftware/> Twitter Hypra <https://twitter.com/Hypra_> Linkedin Jean-Philippe <https://fr.linkedin.com/in/jean-philippe-mengual-800133135>
[toc] | [next] | [standalone]
| From | Joel Wirāmu Pauling <aenertia@aenertia.net> |
|---|---|
| Date | 2019-01-11 23:00 +0100 |
| Message-ID | <xfd0m-1hA-7@gated-at.bofh.it> |
| In reply to | #204325 |
[Multipart message — attachments visible in raw view] — view raw
If using Uefi installs you only need to have a vfat formated first partition with a folder called efi and the appropriate efi binary/substructure. You can use the rest of the disk as you like. BIOS installers on the same can be achieved with syslinux in addition to uefi. However I find that just having uefi seems to go better these days (at least if installing onto recent hardware). Due to varying levels of vendor write as around CSM (compatibility BIOS/system mode) breaking dual BIOS/eufi media installers. -Joel On Sat., 12 Jan. 2019, 09:48 MENGUAL Jean-Philippe <mengualjeanphi@free.fr wrote: > Hi, > > My purpose is having a USB stick splitted in 2 parts: > 1. MBR + partitions: a Debian installer from an ISO > 2. A blank partition to install data or whatver > > While I know to "burn" an iso on a key via dd, how can I do to have a > clean installer but using key for other usages? > > Thanks very much > > regards > > -- > [image: Logo Hypra] JEAN-PHILIPPE MENGUAL > DIRECTEUR TECHNIQUE ET QUALITÉ > 102, rue des poissonniers, 75018, Paris > Tel : +331 84 73 06 61 <+33184730661> Mob : +336 76 34 93 37 > <+33676349337> > jpmengual@hypra.fr > www.hypra.fr > [image: Facebook Hypra] <https://www.facebook.com/hyprasoftware/> [image: > Twitter Hypra] <https://twitter.com/Hypra_> [image: Linkedin > Jean-Philippe] > <https://fr.linkedin.com/in/jean-philippe-mengual-800133135> > >
[toc] | [prev] | [next] | [standalone]
| From | "Thomas Schmitt" <scdbackup@gmx.net> |
|---|---|
| Date | 2019-01-11 23:10 +0100 |
| Message-ID | <xfda2-1At-25@gated-at.bofh.it> |
| In reply to | #204325 |
Hi,
MENGUAL Jean-Philippe wrote:
> My purpose is having a USB stick splitted in 2 parts:
> 1. MBR + partitions: a Debian installer from an ISO
> 2. A blank partition to install data or whatver
>
> While I know to "burn" an iso on a key via dd, how can I do to have a clean
> installer but using key for other usages?
Put the ISO onto the stick, completely deface its pseudo-GPT,
and use program fdisk to add one or more partitions.
The partition situation in a Debian ISO for x86 is not as nice
as it should/could be:
$ /sbin/fdisk -lu debian-9.3.0-amd64-netinst.iso
...
Device Boot Start End Sectors Size Id Type
debian-9.3.0-amd64-netinst.iso1 * 0 593919 593920 290M 0 Empty
debian-9.3.0-amd64-netinst.iso2 3760 4591 832 416K ef EFI (FAT-12/1
Note the EFI partition 2 of type 0xef sitting inside partition 1 which
is of type 0x00.
Nevertheless fdisk will add partition 3 and 4 if you ask it to do so.
There are the data of a GPT, but it is not properly announced by a
protective MBR partition of type 0xee. The GPT shows the same overlapping
partitions, which are explicitely forbidden by the GPT specs.
Thus my advise to remove the GPT header block:
dd if=/dev/zero bs=512 seek=1 count=1 conv=notrunc of=/dev/sdX
where /dev/sdX is the device file of your USB stick.
(Option conv=notrunc is just for the case your of= target is an .iso file
and not a disk device file.)
On a USB stick, the GPT backup header will probably not be recognized
because it will be misplaced. But an overly smart partition editor might
still find it and propose to replace your MBR partition table by that
GPT.
To kill the backup GPT header, you need to compute the last 512-byte
block number n of the ISO (in case of the 9.3.0 ISO n is 593919):
n=$(expr $(ls -l debian-9.3.0-amd64-netinst.iso | awk '{print $5}') / 512 - 1)
and zeroize that block:
dd if=/dev/zero bs=512 seek=$n count=1 conv=notrunc of=/dev/sdX
After this, programs like gdisk will not try to overwrite the MBR
partition table by the GPT.
Have a nice day :)
Thomas
[toc] | [prev] | [next] | [standalone]
| From | MENGUAL Jean-Philippe <mengualjeanphi@free.fr> |
|---|---|
| Date | 2019-01-12 10:20 +0100 |
| Message-ID | <xfnCp-7Zb-9@gated-at.bofh.it> |
| In reply to | #204329 |
Hi,
Thanks for your reply. As I want debian 8 installer, I am not sure about
EFI so I use this method, I could not have creatd it myself.
Le 11/01/2019 à 23:03, Thomas Schmitt a écrit :
> Hi,
>
> MENGUAL Jean-Philippe wrote:
>> My purpose is having a USB stick splitted in 2 parts:
>> 1. MBR + partitions: a Debian installer from an ISO
>> 2. A blank partition to install data or whatver
>>
>> While I know to "burn" an iso on a key via dd, how can I do to have a clean
>> installer but using key for other usages?
>
> Put the ISO onto the stick, completely deface its pseudo-GPT,
> and use program fdisk to add one or more partitions.
1. I issue dd if=/dev/zero of=/dev/sdb
2. Then: dd if=my-iso of=/dev/sdb
3. I ran the command you suggest below.
dd if=/dev/zero bs=512 seek=1 count=1 of=/dev/sdb
dd if=/dev/zero bs=512 seek=$n count=1 of=/dev/sdb
Now at mounting, I have a strange behavior: polki requires a root
password to mount both the Debian partition and the data partition. I
use Debian sid with MATE desktop.
Why? Is it a misbehavior I should report to polkit or semething else?
How can I mount the partitions, in particular the data one, to let the
user write and read?
Thanks
Regards
> The partition situation in a Debian ISO for x86 is not as nice
> as it should/could be:
>
> $ /sbin/fdisk -lu debian-9.3.0-amd64-netinst.iso
> ...
> Device Boot Start End Sectors Size Id Type
> debian-9.3.0-amd64-netinst.iso1 * 0 593919 593920 290M 0 Empty
> debian-9.3.0-amd64-netinst.iso2 3760 4591 832 416K ef EFI (FAT-12/1
>
> Note the EFI partition 2 of type 0xef sitting inside partition 1 which
> is of type 0x00.
> Nevertheless fdisk will add partition 3 and 4 if you ask it to do so.
>
>
> There are the data of a GPT, but it is not properly announced by a
> protective MBR partition of type 0xee. The GPT shows the same overlapping
> partitions, which are explicitely forbidden by the GPT specs.
> Thus my advise to remove the GPT header block:
>
> dd if=/dev/zero bs=512 seek=1 count=1 conv=notrunc of=/dev/sdX
>
> where /dev/sdX is the device file of your USB stick.
> (Option conv=notrunc is just for the case your of= target is an .iso file
> and not a disk device file.)
>
>
> On a USB stick, the GPT backup header will probably not be recognized
> because it will be misplaced. But an overly smart partition editor might
> still find it and propose to replace your MBR partition table by that
> GPT.
>
> To kill the backup GPT header, you need to compute the last 512-byte
> block number n of the ISO (in case of the 9.3.0 ISO n is 593919):
>
> n=$(expr $(ls -l debian-9.3.0-amd64-netinst.iso | awk '{print $5}') / 512 - 1)
>
> and zeroize that block:
>
> dd if=/dev/zero bs=512 seek=$n count=1 conv=notrunc of=/dev/sdX
>
> After this, programs like gdisk will not try to overwrite the MBR
> partition table by the GPT.
>
>
> Have a nice day :)
>
> Thomas
>
[toc] | [prev] | [next] | [standalone]
| From | "Thomas Schmitt" <scdbackup@gmx.net> |
|---|---|
| Date | 2019-01-12 13:00 +0100 |
| Message-ID | <xfq7h-Vo-17@gated-at.bofh.it> |
| In reply to | #204340 |
Hi, > Now at mounting, I have a strange behavior: polki requires a root password > to mount both the Debian partition and the data partition. I use Debian sid > with MATE desktop. If the partitions are recognized by the Linux kernel (i.e. show up as /dev/sdb1, sdb2, sdb3) then the partition table is ok. Password questions for mounting USB sticks seem to be normal. Google "polkit mount password" yields plenty of discussions and proposals. Maybe one of our fellow group members can shorten your search for the right one. Have a nice day :) Thomas
[toc] | [prev] | [next] | [standalone]
| From | Richard Owlett <rowlett@cloud85.net> |
|---|---|
| Date | 2019-01-12 16:50 +0100 |
| Message-ID | <xftHQ-3a7-11@gated-at.bofh.it> |
| In reply to | #204348 |
On 01/12/2019 05:58 AM, Thomas Schmitt wrote:
> Hi,
>
>> Now at mounting, I have a strange behavior: polki requires a root password
>> to mount both the Debian partition and the data partition. I use Debian sid
>> with MATE desktop.
>
> If the partitions are recognized by the Linux kernel (i.e. show up as
> /dev/sdb1, sdb2, sdb3) then the partition table is ok.
>
> Password questions for mounting USB sticks seem to be normal.
> Google "polkit mount password" yields plenty of discussions and proposals.
> Maybe one of our fellow group members can shorten your search for the
> right one.
>
As one who has had many problems with privileges/permissions/etc issues,
"polkit" is the keyword.
I did the suggested search and found:
http://smcv.pseudorandom.co.uk/2015/why_polkit/
and
https://wiki.archlinux.org/index.php/Polkit#For_specific_actions
They briefly summarize the problem system designers faced and hint at
how a user could approach solving the problems in particular use case.
Wish someone had pointed me to polkit a long time ago.
[toc] | [prev] | [next] | [standalone]
| From | Andrei POPESCU <andreimpopescu@gmail.com> |
|---|---|
| Date | 2019-05-19 11:10 +0200 |
| Message-ID | <xZpZn-vn-3@gated-at.bofh.it> |
| In reply to | #204325 |
[Multipart message — attachments visible in raw view] — view raw
On Vi, 11 ian 19, 21:48:06, MENGUAL Jean-Philippe wrote: > Hi, > > My purpose is having a USB stick splitted in 2 parts: > 1. MBR + partitions: a Debian installer from an ISO > 2. A blank partition to install data or whatver > > While I know to "burn" an iso on a key via dd, how can I do to have a clean > installer but using key for other usages? Instead of "burning" the iso image you can manually create a bootable stick and regular-copy an iso of your choice (and anything else you want) to it. https://www.debian.org/releases/stable/amd64/ch04s03.html.en#usb-copy-flexible Kind regards, Andrei -- http://wiki.debian.org/FAQsFromDebianUser
[toc] | [prev] | [standalone]
Back to top | Article view | linux.debian.user
csiph-web