apt-mirror: can't create /media/usb/apt-mirror/mirror directory at /usr/bin/apt-mirror line 342 - onto USB drive
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
2
down vote
favorite
This question is related to this:
apt-mirror: can't create /dir:/mirror directory at /usr/bin/apt-mirror line 342 But the answer there did not help, because the setup is a bit different.
I need to run apt-mirror to store onto an external USB HDD, NTFS formatted.
Running apt-mirror runs into the same error as user Miphix in his post.
As given in the man page I am used
su - apt-mirror -c apt-mirror
and get this error
apt-mirror: can't create /media/usb/apt-mirror/mirror directory at /usr/bin/apt-mirror line 342
which is cause by trying to create a directory where there is a directory already.
The answer to run apt mirror as user apt-mirror does not work on an USB HDD with NFTS, because after mounting the drive chown apt-mirror:apt-mirror dir
does nothing. This is according to Cannot chmode and chown on a ntfs usb drive, because on external USB drives with NTFS there is only a default ownership.I tried changing the mount directory, but it was converted to root:root after the mount.
Since a new download would be 130GB and would take several days, I need to use the existing repostory and just do an update. Also I can not copy it to the local hard drive, because not enough space.
Any ideas?
apt usb-drive ntfs apt-mirror
add a comment |Â
up vote
2
down vote
favorite
This question is related to this:
apt-mirror: can't create /dir:/mirror directory at /usr/bin/apt-mirror line 342 But the answer there did not help, because the setup is a bit different.
I need to run apt-mirror to store onto an external USB HDD, NTFS formatted.
Running apt-mirror runs into the same error as user Miphix in his post.
As given in the man page I am used
su - apt-mirror -c apt-mirror
and get this error
apt-mirror: can't create /media/usb/apt-mirror/mirror directory at /usr/bin/apt-mirror line 342
which is cause by trying to create a directory where there is a directory already.
The answer to run apt mirror as user apt-mirror does not work on an USB HDD with NFTS, because after mounting the drive chown apt-mirror:apt-mirror dir
does nothing. This is according to Cannot chmode and chown on a ntfs usb drive, because on external USB drives with NTFS there is only a default ownership.I tried changing the mount directory, but it was converted to root:root after the mount.
Since a new download would be 130GB and would take several days, I need to use the existing repostory and just do an update. Also I can not copy it to the local hard drive, because not enough space.
Any ideas?
apt usb-drive ntfs apt-mirror
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
This question is related to this:
apt-mirror: can't create /dir:/mirror directory at /usr/bin/apt-mirror line 342 But the answer there did not help, because the setup is a bit different.
I need to run apt-mirror to store onto an external USB HDD, NTFS formatted.
Running apt-mirror runs into the same error as user Miphix in his post.
As given in the man page I am used
su - apt-mirror -c apt-mirror
and get this error
apt-mirror: can't create /media/usb/apt-mirror/mirror directory at /usr/bin/apt-mirror line 342
which is cause by trying to create a directory where there is a directory already.
The answer to run apt mirror as user apt-mirror does not work on an USB HDD with NFTS, because after mounting the drive chown apt-mirror:apt-mirror dir
does nothing. This is according to Cannot chmode and chown on a ntfs usb drive, because on external USB drives with NTFS there is only a default ownership.I tried changing the mount directory, but it was converted to root:root after the mount.
Since a new download would be 130GB and would take several days, I need to use the existing repostory and just do an update. Also I can not copy it to the local hard drive, because not enough space.
Any ideas?
apt usb-drive ntfs apt-mirror
This question is related to this:
apt-mirror: can't create /dir:/mirror directory at /usr/bin/apt-mirror line 342 But the answer there did not help, because the setup is a bit different.
I need to run apt-mirror to store onto an external USB HDD, NTFS formatted.
Running apt-mirror runs into the same error as user Miphix in his post.
As given in the man page I am used
su - apt-mirror -c apt-mirror
and get this error
apt-mirror: can't create /media/usb/apt-mirror/mirror directory at /usr/bin/apt-mirror line 342
which is cause by trying to create a directory where there is a directory already.
The answer to run apt mirror as user apt-mirror does not work on an USB HDD with NFTS, because after mounting the drive chown apt-mirror:apt-mirror dir
does nothing. This is according to Cannot chmode and chown on a ntfs usb drive, because on external USB drives with NTFS there is only a default ownership.I tried changing the mount directory, but it was converted to root:root after the mount.
Since a new download would be 130GB and would take several days, I need to use the existing repostory and just do an update. Also I can not copy it to the local hard drive, because not enough space.
Any ideas?
apt usb-drive ntfs apt-mirror
edited Apr 30 at 19:49
N0rbert
15k33069
15k33069
asked Apr 30 at 18:40
![](https://i.stack.imgur.com/FXEJq.jpg?s=32&g=1)
![](https://i.stack.imgur.com/FXEJq.jpg?s=32&g=1)
CatMan
527319
527319
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
0
down vote
Hopefully not the best and final one, but I found a way to get it working.
I added the NTFS USB drive via /etc/fstab, recycling the options from a smb mount. The line looked like this
in /etc/fstab add
/dev/sdc1 /media/usbdrive ntfs defaults,credentials=/home/user/.smbcredentials,uid=1000,gid=1000,iocharset=utf8 0 0
With this, apt-mirror did start without complaining. Maybe all the options are not really required (I did not further testing) but it did work.
add a comment |Â
up vote
0
down vote
It looks things can turn out to be rather trivial. I now seems to work.
The answer is very close to the linked post above apt-mirror: can't create /dir:/mirror directory at /usr/bin/apt-mirror line 342, but not exactly the same.
In case of an NTFS drive, the permission system does not work. (I guess) Linux sets some workaround that allows the local user to access the drive, despite most files there being owned by root (this is quite interesting, but another story. Should someone have background on this, please put a link into the comments). Thus the solution is most trivial: run apt-mirror without anything.
To copy paste here is a full example procedure to use an external USB HDD at /dev/sdb with apt-mirrror (do not type the comments after (an including) '//'):
$ sudo fdisk -l|grep /dev/sd // find USB device name
Disk /dev/sdb: 2000 GiB // example output
/dev/sdb1 2048 15973654123 1185893215654 2000.0G // example output, bogus values
$ sudo mkdir /mnt/testdrive
$ sudo mount /dev/sdb1 /mnt/testdrive
$ apt-mirror
...
some lengthy output here
...
$ sudo umount /dev/sdb1 // unmount the
The '$' is the prompt. It marks the lines with commands, other lines are screen output
The important change from the other post above is
$ apt-mirror
Which runs apt-mirror as the normal unprivileged user. I think the statements both in the apt-mirror help file and the wiki are misleading. At least in my case they did not work.
Done.
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Hopefully not the best and final one, but I found a way to get it working.
I added the NTFS USB drive via /etc/fstab, recycling the options from a smb mount. The line looked like this
in /etc/fstab add
/dev/sdc1 /media/usbdrive ntfs defaults,credentials=/home/user/.smbcredentials,uid=1000,gid=1000,iocharset=utf8 0 0
With this, apt-mirror did start without complaining. Maybe all the options are not really required (I did not further testing) but it did work.
add a comment |Â
up vote
0
down vote
Hopefully not the best and final one, but I found a way to get it working.
I added the NTFS USB drive via /etc/fstab, recycling the options from a smb mount. The line looked like this
in /etc/fstab add
/dev/sdc1 /media/usbdrive ntfs defaults,credentials=/home/user/.smbcredentials,uid=1000,gid=1000,iocharset=utf8 0 0
With this, apt-mirror did start without complaining. Maybe all the options are not really required (I did not further testing) but it did work.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Hopefully not the best and final one, but I found a way to get it working.
I added the NTFS USB drive via /etc/fstab, recycling the options from a smb mount. The line looked like this
in /etc/fstab add
/dev/sdc1 /media/usbdrive ntfs defaults,credentials=/home/user/.smbcredentials,uid=1000,gid=1000,iocharset=utf8 0 0
With this, apt-mirror did start without complaining. Maybe all the options are not really required (I did not further testing) but it did work.
Hopefully not the best and final one, but I found a way to get it working.
I added the NTFS USB drive via /etc/fstab, recycling the options from a smb mount. The line looked like this
in /etc/fstab add
/dev/sdc1 /media/usbdrive ntfs defaults,credentials=/home/user/.smbcredentials,uid=1000,gid=1000,iocharset=utf8 0 0
With this, apt-mirror did start without complaining. Maybe all the options are not really required (I did not further testing) but it did work.
answered May 4 at 14:44
![](https://i.stack.imgur.com/FXEJq.jpg?s=32&g=1)
![](https://i.stack.imgur.com/FXEJq.jpg?s=32&g=1)
CatMan
527319
527319
add a comment |Â
add a comment |Â
up vote
0
down vote
It looks things can turn out to be rather trivial. I now seems to work.
The answer is very close to the linked post above apt-mirror: can't create /dir:/mirror directory at /usr/bin/apt-mirror line 342, but not exactly the same.
In case of an NTFS drive, the permission system does not work. (I guess) Linux sets some workaround that allows the local user to access the drive, despite most files there being owned by root (this is quite interesting, but another story. Should someone have background on this, please put a link into the comments). Thus the solution is most trivial: run apt-mirror without anything.
To copy paste here is a full example procedure to use an external USB HDD at /dev/sdb with apt-mirrror (do not type the comments after (an including) '//'):
$ sudo fdisk -l|grep /dev/sd // find USB device name
Disk /dev/sdb: 2000 GiB // example output
/dev/sdb1 2048 15973654123 1185893215654 2000.0G // example output, bogus values
$ sudo mkdir /mnt/testdrive
$ sudo mount /dev/sdb1 /mnt/testdrive
$ apt-mirror
...
some lengthy output here
...
$ sudo umount /dev/sdb1 // unmount the
The '$' is the prompt. It marks the lines with commands, other lines are screen output
The important change from the other post above is
$ apt-mirror
Which runs apt-mirror as the normal unprivileged user. I think the statements both in the apt-mirror help file and the wiki are misleading. At least in my case they did not work.
Done.
add a comment |Â
up vote
0
down vote
It looks things can turn out to be rather trivial. I now seems to work.
The answer is very close to the linked post above apt-mirror: can't create /dir:/mirror directory at /usr/bin/apt-mirror line 342, but not exactly the same.
In case of an NTFS drive, the permission system does not work. (I guess) Linux sets some workaround that allows the local user to access the drive, despite most files there being owned by root (this is quite interesting, but another story. Should someone have background on this, please put a link into the comments). Thus the solution is most trivial: run apt-mirror without anything.
To copy paste here is a full example procedure to use an external USB HDD at /dev/sdb with apt-mirrror (do not type the comments after (an including) '//'):
$ sudo fdisk -l|grep /dev/sd // find USB device name
Disk /dev/sdb: 2000 GiB // example output
/dev/sdb1 2048 15973654123 1185893215654 2000.0G // example output, bogus values
$ sudo mkdir /mnt/testdrive
$ sudo mount /dev/sdb1 /mnt/testdrive
$ apt-mirror
...
some lengthy output here
...
$ sudo umount /dev/sdb1 // unmount the
The '$' is the prompt. It marks the lines with commands, other lines are screen output
The important change from the other post above is
$ apt-mirror
Which runs apt-mirror as the normal unprivileged user. I think the statements both in the apt-mirror help file and the wiki are misleading. At least in my case they did not work.
Done.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
It looks things can turn out to be rather trivial. I now seems to work.
The answer is very close to the linked post above apt-mirror: can't create /dir:/mirror directory at /usr/bin/apt-mirror line 342, but not exactly the same.
In case of an NTFS drive, the permission system does not work. (I guess) Linux sets some workaround that allows the local user to access the drive, despite most files there being owned by root (this is quite interesting, but another story. Should someone have background on this, please put a link into the comments). Thus the solution is most trivial: run apt-mirror without anything.
To copy paste here is a full example procedure to use an external USB HDD at /dev/sdb with apt-mirrror (do not type the comments after (an including) '//'):
$ sudo fdisk -l|grep /dev/sd // find USB device name
Disk /dev/sdb: 2000 GiB // example output
/dev/sdb1 2048 15973654123 1185893215654 2000.0G // example output, bogus values
$ sudo mkdir /mnt/testdrive
$ sudo mount /dev/sdb1 /mnt/testdrive
$ apt-mirror
...
some lengthy output here
...
$ sudo umount /dev/sdb1 // unmount the
The '$' is the prompt. It marks the lines with commands, other lines are screen output
The important change from the other post above is
$ apt-mirror
Which runs apt-mirror as the normal unprivileged user. I think the statements both in the apt-mirror help file and the wiki are misleading. At least in my case they did not work.
Done.
It looks things can turn out to be rather trivial. I now seems to work.
The answer is very close to the linked post above apt-mirror: can't create /dir:/mirror directory at /usr/bin/apt-mirror line 342, but not exactly the same.
In case of an NTFS drive, the permission system does not work. (I guess) Linux sets some workaround that allows the local user to access the drive, despite most files there being owned by root (this is quite interesting, but another story. Should someone have background on this, please put a link into the comments). Thus the solution is most trivial: run apt-mirror without anything.
To copy paste here is a full example procedure to use an external USB HDD at /dev/sdb with apt-mirrror (do not type the comments after (an including) '//'):
$ sudo fdisk -l|grep /dev/sd // find USB device name
Disk /dev/sdb: 2000 GiB // example output
/dev/sdb1 2048 15973654123 1185893215654 2000.0G // example output, bogus values
$ sudo mkdir /mnt/testdrive
$ sudo mount /dev/sdb1 /mnt/testdrive
$ apt-mirror
...
some lengthy output here
...
$ sudo umount /dev/sdb1 // unmount the
The '$' is the prompt. It marks the lines with commands, other lines are screen output
The important change from the other post above is
$ apt-mirror
Which runs apt-mirror as the normal unprivileged user. I think the statements both in the apt-mirror help file and the wiki are misleading. At least in my case they did not work.
Done.
answered May 13 at 20:39
![](https://i.stack.imgur.com/FXEJq.jpg?s=32&g=1)
![](https://i.stack.imgur.com/FXEJq.jpg?s=32&g=1)
CatMan
527319
527319
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1030262%2fapt-mirror-cant-create-media-usb-apt-mirror-mirror-directory-at-usr-bin-apt%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
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