Re: How to"apt update" from an USB key ?
On Thu 12 Jul 2018 at 03:05:49 (+0000), davidson wrote:
> On Wed, 11 Jul 2018, Pierre Couderc wrote:
>
> >
> >On 07/11/2018 03:14 PM, Curt wrote:
> >>On 2018-07-11, Pierre Couderc <pierre@couderc.eu> wrote:
> >>>On an ultraslim (ACER swift 3) I have no CDROM no Ethernet,
> >>>only an USB key.
> >>>I have installed stretch (without GUI) from the USB key, and now I want
> >>>to install connman, but I do not success to apt-cdrom on an USB.
> >>>I have googled but did not find a correct howto to do that...
> >>Not clear what's on the stick; I assume it's DVD1 (or CD1). (I mean if
> >>you're trying to use apt-cdrom with the stick and the machine has no
> >>internet connection and you installed from the stick this is my
> >>assumption.
> >Yes, your assumption is right. I have created the USB stick with
> >dd .iso ->usb.
> >I thank very much John, Darac y Roberto, but it is not my problem.
> >> Others seem to have assumed other things. As I have a very
> >>low assumption batting average lately I hesitate slightly to join the
> >>fray.)
> >>
> >>(copied from a post by UK Brian--I think there's only one over there)
> >>
> >> First adjust sources.list to only have
> >>
> >> deb [ trusted=yes ] file:/media/DVD-1/ stretch main
> >>
> >>("trusted" avoids warnings about unauthenticated packages--you trust
> >>the iso on the stick, we assume.)
> >>
> >> Make the DVD-1 directory:
> >>
> >> mkdir /media/DVD-1/
> >>
> >> and insert the USB stick. Obtain the device name from dmesg or lsblk.
> >> Then (for example)
> >>
> >> mount /dev/sdg1 /media/DVD-1/
> >>
> >>apt update; apt install connman
> >>
>
> >Merci beucoup, Curt I had seen this kind of solution, but it did
> >not work as I had not discovered the "trusted" option.
> >
> >Now, I have to understand why it says me :
> >
> >Malformed line 6 in source list /etc/apt/sources.list (URI parse)
> >
> >when my line 6 is :
> >
> >deb [trusted=yes] file:/media/cdrom/ stretch main
>
> On-topic:
>
> I hesitate to speculate out loud about features I have never used and
> am too lazy to test out myself, but since the OP is getting complaints
> about malformed lines, I will remark that in every example shown in...
>
> $ man sources.list
>
> ... where option-values are passed within square brackets ([]), there
> are spaces separating the option specification from its enclosing
> brackets. For example, one sees
>
> deb [ someoption=somevalue ] uri stretch main
>
> but never
>
> deb [someoption=somevalue] uri stretch main
>
> So maybe the spaces following '[' and preceding ']' are important.
FWIW my take on this man page is different from yours.
The format for two one-line-style entries using the deb and
deb-src types is:
deb [ option1=value1 option2=value2 ] uri suite [component1] [component2] [...]
deb-src [ option1=value1 option2=value2 ] uri suite [component1] [component2] [...]
The " [ " and " ] " stand for themselves, and delimit the option list.
The " [component1] " stands for, say, "main" or "contrib" etc., ie brackets are metacharacters.
Perhaps:
deb "[" option1=value1 option2=value2 "]" uri suite [component1] [component2] [...]
deb-src "[" option1=value1 option2=value2 "]" uri suite [component1] [component2] [...]
would be clearer.
Cheers,
David.
Reply to: