Failed to create symbolic link?
Clash Royale CLAN TAG#URR8PPP
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty margin-bottom:0;
up vote
1
down vote
favorite
I'm trying to symlink file /etc/systemd/network/00-default.link
to /boot/00-default.link
. This allows me to force a change to my MAC address from the boot
directory, which is the only directory accessible from my Mac computer when I plug in the SD card.
However, when I use the command:
sudo ln -s /etc/systemd/network/00-default.link /boot/00-default.link
I receive the error:
ln: failed to create symbolic link '/boot/00-default.link': Operation not permitted
Any idea what might be causing this?
Note: I've created /etc/systemd/network/00-default.link
already but I have not yet created /boot/00-default.link
linux raspbian-stretch
add a comment |Â
up vote
1
down vote
favorite
I'm trying to symlink file /etc/systemd/network/00-default.link
to /boot/00-default.link
. This allows me to force a change to my MAC address from the boot
directory, which is the only directory accessible from my Mac computer when I plug in the SD card.
However, when I use the command:
sudo ln -s /etc/systemd/network/00-default.link /boot/00-default.link
I receive the error:
ln: failed to create symbolic link '/boot/00-default.link': Operation not permitted
Any idea what might be causing this?
Note: I've created /etc/systemd/network/00-default.link
already but I have not yet created /boot/00-default.link
linux raspbian-stretch
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I'm trying to symlink file /etc/systemd/network/00-default.link
to /boot/00-default.link
. This allows me to force a change to my MAC address from the boot
directory, which is the only directory accessible from my Mac computer when I plug in the SD card.
However, when I use the command:
sudo ln -s /etc/systemd/network/00-default.link /boot/00-default.link
I receive the error:
ln: failed to create symbolic link '/boot/00-default.link': Operation not permitted
Any idea what might be causing this?
Note: I've created /etc/systemd/network/00-default.link
already but I have not yet created /boot/00-default.link
linux raspbian-stretch
I'm trying to symlink file /etc/systemd/network/00-default.link
to /boot/00-default.link
. This allows me to force a change to my MAC address from the boot
directory, which is the only directory accessible from my Mac computer when I plug in the SD card.
However, when I use the command:
sudo ln -s /etc/systemd/network/00-default.link /boot/00-default.link
I receive the error:
ln: failed to create symbolic link '/boot/00-default.link': Operation not permitted
Any idea what might be causing this?
Note: I've created /etc/systemd/network/00-default.link
already but I have not yet created /boot/00-default.link
linux raspbian-stretch
linux raspbian-stretch
asked 4 hours ago
Matt
2129
2129
add a comment |Â
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
2
down vote
accepted
/boot
is a FAT filesystem that unfortunately does not support symbolic links.
So this cannot work
sudo ln -s /etc/systemd/network/00-default.link /boot/00-default.link
Turning it around and placing the file itself (source) on /boot
and the link (target) on /etc
however should do
sudo ln -s /boot/00-default.link /etc/systemd/network/00-default.link
This would however lack unixoid access permissions for the file - if that is an issue.
Interesting. I've noticed that if I move the file into/boot/
then symlink that file into somewhere else it works fine though, how is it able to work in one direction and not the other though?
â Matt
4 hours ago
Follow up question - since/boot/
requires a hard copy of the file and/etc/systemd/network/
also requires a hard copy to change the MAC address, would it be possible to use an intermediary third symlinked file as a bridge between the two hard files (meaning I could edit hard file/boot/00-default.link
, which would edit the symlink/home/Pi/Desktop/bridge.link
which in turn would edit hard copy of/etc/systemd/00-default.link
)? Hopefully that made sense
â Matt
4 hours ago
1
w.r.t. the first comment, so you have a link from a unixoid FS to the vfat partition? That's just fine.
â Ghanimaâ¦
4 hours ago
correct, I have a hard file/boot/my_script.py
with symlink/home/Pi/Desktop/my_symlinked_script.py
â Matt
3 hours ago
Thanks for adding that edit @Ghaninma, that clarified a lot. I believe in this case the lack of unixoid access permissions is causing an issue for whatever reason. Can you think of any way to get around that while still linking the file to/boot/
â Matt
3 hours ago
add a comment |Â
up vote
1
down vote
From your earlier questions, I know why you want to do this from boot, and symlinking /boot/00-default.link
to /etc/systemd/network/00-default.link
doesn't help, because /etc/systemd/network/00-default.link
seems to be processed before /boot
is mounted - therefore /etc/systemd/network/00-default.link
is a broken link at the time it is being processed
I don't know if this is fact, but I know that linking that way also doesn't help, so I am assuming it to be fact :p
Here's a solution I came up with :p
Create a service in /etc/systemd/system
- lets call it macoverride.service
[Unit]
Description=Copy user mac_override.link
ConditionPathExists=/boot/mac_override.link
After=local-fs.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mv /boot/mac_override.link /etc/systemd/network/00-default.link
ExecStartPost=/sbin/reboot
[Install]
WantedBy=multi-user.target
Now, enable it
sudo systemctl enable /etc/systemd/system/macoverride.service
What this service does is
- if
/boot/mac_override.link
exists - move it to/etc/systemd/network/00-default.link
- reboot
Now, since step 1 moves the file, it won't exist after the reboot - so there's no chance of a reboot loop :p
The OP might want to consider accepting this answer as it addresses the "implicit" issue of the question far better than mine ;) Your approach reminds me of what Raspbian is doing with thewpa_supplicant.conf
file that is magically transferred from/boot
to the correct spot somewhere in/etc
.
â Ghanimaâ¦
23 mins ago
@Ghanima - your answer actually answers the question though, so more useful for "future readers" - I've helped the OP in two other questions, so I kinda know the overall picture of what he's trying to achieve - as such, while this answer does provide a possible solution (there are others) this doesn't really answer the question, and so, not really helpful to anyone but Matt :p
â Jaromanda X
13 mins ago
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
/boot
is a FAT filesystem that unfortunately does not support symbolic links.
So this cannot work
sudo ln -s /etc/systemd/network/00-default.link /boot/00-default.link
Turning it around and placing the file itself (source) on /boot
and the link (target) on /etc
however should do
sudo ln -s /boot/00-default.link /etc/systemd/network/00-default.link
This would however lack unixoid access permissions for the file - if that is an issue.
Interesting. I've noticed that if I move the file into/boot/
then symlink that file into somewhere else it works fine though, how is it able to work in one direction and not the other though?
â Matt
4 hours ago
Follow up question - since/boot/
requires a hard copy of the file and/etc/systemd/network/
also requires a hard copy to change the MAC address, would it be possible to use an intermediary third symlinked file as a bridge between the two hard files (meaning I could edit hard file/boot/00-default.link
, which would edit the symlink/home/Pi/Desktop/bridge.link
which in turn would edit hard copy of/etc/systemd/00-default.link
)? Hopefully that made sense
â Matt
4 hours ago
1
w.r.t. the first comment, so you have a link from a unixoid FS to the vfat partition? That's just fine.
â Ghanimaâ¦
4 hours ago
correct, I have a hard file/boot/my_script.py
with symlink/home/Pi/Desktop/my_symlinked_script.py
â Matt
3 hours ago
Thanks for adding that edit @Ghaninma, that clarified a lot. I believe in this case the lack of unixoid access permissions is causing an issue for whatever reason. Can you think of any way to get around that while still linking the file to/boot/
â Matt
3 hours ago
add a comment |Â
up vote
2
down vote
accepted
/boot
is a FAT filesystem that unfortunately does not support symbolic links.
So this cannot work
sudo ln -s /etc/systemd/network/00-default.link /boot/00-default.link
Turning it around and placing the file itself (source) on /boot
and the link (target) on /etc
however should do
sudo ln -s /boot/00-default.link /etc/systemd/network/00-default.link
This would however lack unixoid access permissions for the file - if that is an issue.
Interesting. I've noticed that if I move the file into/boot/
then symlink that file into somewhere else it works fine though, how is it able to work in one direction and not the other though?
â Matt
4 hours ago
Follow up question - since/boot/
requires a hard copy of the file and/etc/systemd/network/
also requires a hard copy to change the MAC address, would it be possible to use an intermediary third symlinked file as a bridge between the two hard files (meaning I could edit hard file/boot/00-default.link
, which would edit the symlink/home/Pi/Desktop/bridge.link
which in turn would edit hard copy of/etc/systemd/00-default.link
)? Hopefully that made sense
â Matt
4 hours ago
1
w.r.t. the first comment, so you have a link from a unixoid FS to the vfat partition? That's just fine.
â Ghanimaâ¦
4 hours ago
correct, I have a hard file/boot/my_script.py
with symlink/home/Pi/Desktop/my_symlinked_script.py
â Matt
3 hours ago
Thanks for adding that edit @Ghaninma, that clarified a lot. I believe in this case the lack of unixoid access permissions is causing an issue for whatever reason. Can you think of any way to get around that while still linking the file to/boot/
â Matt
3 hours ago
add a comment |Â
up vote
2
down vote
accepted
up vote
2
down vote
accepted
/boot
is a FAT filesystem that unfortunately does not support symbolic links.
So this cannot work
sudo ln -s /etc/systemd/network/00-default.link /boot/00-default.link
Turning it around and placing the file itself (source) on /boot
and the link (target) on /etc
however should do
sudo ln -s /boot/00-default.link /etc/systemd/network/00-default.link
This would however lack unixoid access permissions for the file - if that is an issue.
/boot
is a FAT filesystem that unfortunately does not support symbolic links.
So this cannot work
sudo ln -s /etc/systemd/network/00-default.link /boot/00-default.link
Turning it around and placing the file itself (source) on /boot
and the link (target) on /etc
however should do
sudo ln -s /boot/00-default.link /etc/systemd/network/00-default.link
This would however lack unixoid access permissions for the file - if that is an issue.
edited 3 hours ago
answered 4 hours ago
Ghanimaâ¦
11.4k93874
11.4k93874
Interesting. I've noticed that if I move the file into/boot/
then symlink that file into somewhere else it works fine though, how is it able to work in one direction and not the other though?
â Matt
4 hours ago
Follow up question - since/boot/
requires a hard copy of the file and/etc/systemd/network/
also requires a hard copy to change the MAC address, would it be possible to use an intermediary third symlinked file as a bridge between the two hard files (meaning I could edit hard file/boot/00-default.link
, which would edit the symlink/home/Pi/Desktop/bridge.link
which in turn would edit hard copy of/etc/systemd/00-default.link
)? Hopefully that made sense
â Matt
4 hours ago
1
w.r.t. the first comment, so you have a link from a unixoid FS to the vfat partition? That's just fine.
â Ghanimaâ¦
4 hours ago
correct, I have a hard file/boot/my_script.py
with symlink/home/Pi/Desktop/my_symlinked_script.py
â Matt
3 hours ago
Thanks for adding that edit @Ghaninma, that clarified a lot. I believe in this case the lack of unixoid access permissions is causing an issue for whatever reason. Can you think of any way to get around that while still linking the file to/boot/
â Matt
3 hours ago
add a comment |Â
Interesting. I've noticed that if I move the file into/boot/
then symlink that file into somewhere else it works fine though, how is it able to work in one direction and not the other though?
â Matt
4 hours ago
Follow up question - since/boot/
requires a hard copy of the file and/etc/systemd/network/
also requires a hard copy to change the MAC address, would it be possible to use an intermediary third symlinked file as a bridge between the two hard files (meaning I could edit hard file/boot/00-default.link
, which would edit the symlink/home/Pi/Desktop/bridge.link
which in turn would edit hard copy of/etc/systemd/00-default.link
)? Hopefully that made sense
â Matt
4 hours ago
1
w.r.t. the first comment, so you have a link from a unixoid FS to the vfat partition? That's just fine.
â Ghanimaâ¦
4 hours ago
correct, I have a hard file/boot/my_script.py
with symlink/home/Pi/Desktop/my_symlinked_script.py
â Matt
3 hours ago
Thanks for adding that edit @Ghaninma, that clarified a lot. I believe in this case the lack of unixoid access permissions is causing an issue for whatever reason. Can you think of any way to get around that while still linking the file to/boot/
â Matt
3 hours ago
Interesting. I've noticed that if I move the file into
/boot/
then symlink that file into somewhere else it works fine though, how is it able to work in one direction and not the other though?â Matt
4 hours ago
Interesting. I've noticed that if I move the file into
/boot/
then symlink that file into somewhere else it works fine though, how is it able to work in one direction and not the other though?â Matt
4 hours ago
Follow up question - since
/boot/
requires a hard copy of the file and /etc/systemd/network/
also requires a hard copy to change the MAC address, would it be possible to use an intermediary third symlinked file as a bridge between the two hard files (meaning I could edit hard file /boot/00-default.link
, which would edit the symlink /home/Pi/Desktop/bridge.link
which in turn would edit hard copy of /etc/systemd/00-default.link
)? Hopefully that made senseâ Matt
4 hours ago
Follow up question - since
/boot/
requires a hard copy of the file and /etc/systemd/network/
also requires a hard copy to change the MAC address, would it be possible to use an intermediary third symlinked file as a bridge between the two hard files (meaning I could edit hard file /boot/00-default.link
, which would edit the symlink /home/Pi/Desktop/bridge.link
which in turn would edit hard copy of /etc/systemd/00-default.link
)? Hopefully that made senseâ Matt
4 hours ago
1
1
w.r.t. the first comment, so you have a link from a unixoid FS to the vfat partition? That's just fine.
â Ghanimaâ¦
4 hours ago
w.r.t. the first comment, so you have a link from a unixoid FS to the vfat partition? That's just fine.
â Ghanimaâ¦
4 hours ago
correct, I have a hard file
/boot/my_script.py
with symlink /home/Pi/Desktop/my_symlinked_script.py
â Matt
3 hours ago
correct, I have a hard file
/boot/my_script.py
with symlink /home/Pi/Desktop/my_symlinked_script.py
â Matt
3 hours ago
Thanks for adding that edit @Ghaninma, that clarified a lot. I believe in this case the lack of unixoid access permissions is causing an issue for whatever reason. Can you think of any way to get around that while still linking the file to
/boot/
â Matt
3 hours ago
Thanks for adding that edit @Ghaninma, that clarified a lot. I believe in this case the lack of unixoid access permissions is causing an issue for whatever reason. Can you think of any way to get around that while still linking the file to
/boot/
â Matt
3 hours ago
add a comment |Â
up vote
1
down vote
From your earlier questions, I know why you want to do this from boot, and symlinking /boot/00-default.link
to /etc/systemd/network/00-default.link
doesn't help, because /etc/systemd/network/00-default.link
seems to be processed before /boot
is mounted - therefore /etc/systemd/network/00-default.link
is a broken link at the time it is being processed
I don't know if this is fact, but I know that linking that way also doesn't help, so I am assuming it to be fact :p
Here's a solution I came up with :p
Create a service in /etc/systemd/system
- lets call it macoverride.service
[Unit]
Description=Copy user mac_override.link
ConditionPathExists=/boot/mac_override.link
After=local-fs.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mv /boot/mac_override.link /etc/systemd/network/00-default.link
ExecStartPost=/sbin/reboot
[Install]
WantedBy=multi-user.target
Now, enable it
sudo systemctl enable /etc/systemd/system/macoverride.service
What this service does is
- if
/boot/mac_override.link
exists - move it to/etc/systemd/network/00-default.link
- reboot
Now, since step 1 moves the file, it won't exist after the reboot - so there's no chance of a reboot loop :p
The OP might want to consider accepting this answer as it addresses the "implicit" issue of the question far better than mine ;) Your approach reminds me of what Raspbian is doing with thewpa_supplicant.conf
file that is magically transferred from/boot
to the correct spot somewhere in/etc
.
â Ghanimaâ¦
23 mins ago
@Ghanima - your answer actually answers the question though, so more useful for "future readers" - I've helped the OP in two other questions, so I kinda know the overall picture of what he's trying to achieve - as such, while this answer does provide a possible solution (there are others) this doesn't really answer the question, and so, not really helpful to anyone but Matt :p
â Jaromanda X
13 mins ago
add a comment |Â
up vote
1
down vote
From your earlier questions, I know why you want to do this from boot, and symlinking /boot/00-default.link
to /etc/systemd/network/00-default.link
doesn't help, because /etc/systemd/network/00-default.link
seems to be processed before /boot
is mounted - therefore /etc/systemd/network/00-default.link
is a broken link at the time it is being processed
I don't know if this is fact, but I know that linking that way also doesn't help, so I am assuming it to be fact :p
Here's a solution I came up with :p
Create a service in /etc/systemd/system
- lets call it macoverride.service
[Unit]
Description=Copy user mac_override.link
ConditionPathExists=/boot/mac_override.link
After=local-fs.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mv /boot/mac_override.link /etc/systemd/network/00-default.link
ExecStartPost=/sbin/reboot
[Install]
WantedBy=multi-user.target
Now, enable it
sudo systemctl enable /etc/systemd/system/macoverride.service
What this service does is
- if
/boot/mac_override.link
exists - move it to/etc/systemd/network/00-default.link
- reboot
Now, since step 1 moves the file, it won't exist after the reboot - so there's no chance of a reboot loop :p
The OP might want to consider accepting this answer as it addresses the "implicit" issue of the question far better than mine ;) Your approach reminds me of what Raspbian is doing with thewpa_supplicant.conf
file that is magically transferred from/boot
to the correct spot somewhere in/etc
.
â Ghanimaâ¦
23 mins ago
@Ghanima - your answer actually answers the question though, so more useful for "future readers" - I've helped the OP in two other questions, so I kinda know the overall picture of what he's trying to achieve - as such, while this answer does provide a possible solution (there are others) this doesn't really answer the question, and so, not really helpful to anyone but Matt :p
â Jaromanda X
13 mins ago
add a comment |Â
up vote
1
down vote
up vote
1
down vote
From your earlier questions, I know why you want to do this from boot, and symlinking /boot/00-default.link
to /etc/systemd/network/00-default.link
doesn't help, because /etc/systemd/network/00-default.link
seems to be processed before /boot
is mounted - therefore /etc/systemd/network/00-default.link
is a broken link at the time it is being processed
I don't know if this is fact, but I know that linking that way also doesn't help, so I am assuming it to be fact :p
Here's a solution I came up with :p
Create a service in /etc/systemd/system
- lets call it macoverride.service
[Unit]
Description=Copy user mac_override.link
ConditionPathExists=/boot/mac_override.link
After=local-fs.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mv /boot/mac_override.link /etc/systemd/network/00-default.link
ExecStartPost=/sbin/reboot
[Install]
WantedBy=multi-user.target
Now, enable it
sudo systemctl enable /etc/systemd/system/macoverride.service
What this service does is
- if
/boot/mac_override.link
exists - move it to/etc/systemd/network/00-default.link
- reboot
Now, since step 1 moves the file, it won't exist after the reboot - so there's no chance of a reboot loop :p
From your earlier questions, I know why you want to do this from boot, and symlinking /boot/00-default.link
to /etc/systemd/network/00-default.link
doesn't help, because /etc/systemd/network/00-default.link
seems to be processed before /boot
is mounted - therefore /etc/systemd/network/00-default.link
is a broken link at the time it is being processed
I don't know if this is fact, but I know that linking that way also doesn't help, so I am assuming it to be fact :p
Here's a solution I came up with :p
Create a service in /etc/systemd/system
- lets call it macoverride.service
[Unit]
Description=Copy user mac_override.link
ConditionPathExists=/boot/mac_override.link
After=local-fs.target
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/bin/mv /boot/mac_override.link /etc/systemd/network/00-default.link
ExecStartPost=/sbin/reboot
[Install]
WantedBy=multi-user.target
Now, enable it
sudo systemctl enable /etc/systemd/system/macoverride.service
What this service does is
- if
/boot/mac_override.link
exists - move it to/etc/systemd/network/00-default.link
- reboot
Now, since step 1 moves the file, it won't exist after the reboot - so there's no chance of a reboot loop :p
answered 52 mins ago
Jaromanda X
640169
640169
The OP might want to consider accepting this answer as it addresses the "implicit" issue of the question far better than mine ;) Your approach reminds me of what Raspbian is doing with thewpa_supplicant.conf
file that is magically transferred from/boot
to the correct spot somewhere in/etc
.
â Ghanimaâ¦
23 mins ago
@Ghanima - your answer actually answers the question though, so more useful for "future readers" - I've helped the OP in two other questions, so I kinda know the overall picture of what he's trying to achieve - as such, while this answer does provide a possible solution (there are others) this doesn't really answer the question, and so, not really helpful to anyone but Matt :p
â Jaromanda X
13 mins ago
add a comment |Â
The OP might want to consider accepting this answer as it addresses the "implicit" issue of the question far better than mine ;) Your approach reminds me of what Raspbian is doing with thewpa_supplicant.conf
file that is magically transferred from/boot
to the correct spot somewhere in/etc
.
â Ghanimaâ¦
23 mins ago
@Ghanima - your answer actually answers the question though, so more useful for "future readers" - I've helped the OP in two other questions, so I kinda know the overall picture of what he's trying to achieve - as such, while this answer does provide a possible solution (there are others) this doesn't really answer the question, and so, not really helpful to anyone but Matt :p
â Jaromanda X
13 mins ago
The OP might want to consider accepting this answer as it addresses the "implicit" issue of the question far better than mine ;) Your approach reminds me of what Raspbian is doing with the
wpa_supplicant.conf
file that is magically transferred from /boot
to the correct spot somewhere in /etc
.â Ghanimaâ¦
23 mins ago
The OP might want to consider accepting this answer as it addresses the "implicit" issue of the question far better than mine ;) Your approach reminds me of what Raspbian is doing with the
wpa_supplicant.conf
file that is magically transferred from /boot
to the correct spot somewhere in /etc
.â Ghanimaâ¦
23 mins ago
@Ghanima - your answer actually answers the question though, so more useful for "future readers" - I've helped the OP in two other questions, so I kinda know the overall picture of what he's trying to achieve - as such, while this answer does provide a possible solution (there are others) this doesn't really answer the question, and so, not really helpful to anyone but Matt :p
â Jaromanda X
13 mins ago
@Ghanima - your answer actually answers the question though, so more useful for "future readers" - I've helped the OP in two other questions, so I kinda know the overall picture of what he's trying to achieve - as such, while this answer does provide a possible solution (there are others) this doesn't really answer the question, and so, not really helpful to anyone but Matt :p
â Jaromanda X
13 mins ago
add a comment |Â
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
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fraspberrypi.stackexchange.com%2fquestions%2f89994%2ffailed-to-create-symbolic-link%23new-answer', 'question_page');
);
Post as a guest
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
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
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