Elementary OS custom iso doesn't show network, neither have sudo permissions
Created a custom iso of Elementary OS with Cubic, but it doesn't show wifi networks. Acts like as if I don't have any wifi hardware. Also, I can't run any sudo commands. When I try, it shows the following error:
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
I just enabled elementary tweaks, and included some softwares that I would like to have in my live iso. Didn't mess around with anything else, still can't figure out what could possibly go wrong. I tried the same process with Elementary OS Loki (0.4), Juno (5.0) and Hera (5.1), but got the same issue.
Question information
- Language:
- English Edit question
- Status:
- Solved
- For:
- Cubic Edit question
- Assignee:
- No assignee Edit question
- Solved by:
- Abdul Ahad Mamun
- Solved:
- Last query:
- Last reply:
Revision history for this message
|
#1 |
This issue happens in the customized live ISO, or after you’ve installed the customized system to disk?
What is the output of?…
ls -l /usr/bin/sudo
Revision history for this message
|
#2 |
This issue happening in the customized live ISO.
If I enter "ls -l /usr/bin/sudo"
the output is : "-rwxrwxrwx 1 1000 1000 136808 Aug 17 2016 /usr/bin/sudo"
Revision history for this message
|
#3 |
I’ll see if I can recreate this issue on my end. It may take me some time to get to it, though.
Revision history for this message
|
#4 |
Thank you so much for your effort. Let's hope for a solution.
Revision history for this message
|
#5 |
Your output should look like this...
# ls -l /usr/bin/sudo
-rwsr-xr-x 1 root root 166056 Jan 19 2021 /usr/bin/sudo
Notice that /usr/bin/sudo is owned by root.
The user id for root is 0, not 1000.
1000 us usually the user id for the first user on your system.
Have you done anything to change ownership or permissions of your file system while customizing your ISO?
Revision history for this message
|
#6 |
I downloaded and customized elementaryos-
The only changes I made in Cubic's terminal environment were:
1. Install software-
2. Add the PPA for pantheon-tweaks
3. Install pantheon-tweaks
I also checked the ownership of /usr/bin/sudo before and after the changes.
# ls -l /usr/bin/sudo
-rwsr-xr-x 1 root root 166056 Jan 19 2021 /usr/bin/sudo
# apt update
# apt install software-
# add-apt-repository ppa:philip.
# apt update
# apt install pantheon-tweaks
# ls -l /usr/bin/sudo
-rwsr-xr-x 1 root root 166056 Jan 19 2021 /usr/bin/sudo
After generating the customized ISO, I tested it in VirtualBox.
I selected the "Demo mode", and booted into the customized Live Environment.
The ownership of /usr/bin/sudo was "root" (user id #0) as expected:
# ls -l /usr/bin/sudo
-rwsr-xr-x 1 root root 166056 Jan 19 2021 /usr/bin/sudo
I also tested that I could launch Pantheon Tweaks, and I tested the sudo command.
Both worked as expected.
I suspect that you have changed the file ownerships (accidentally??) while customizing your OS in Cubic, or you have modified some files outside of Cubic(??) before generating your ISO.
Revision history for this message
|
#7 |
Thank you for your response. To be safe, I tried it again but without making any changes. In the chroot environment, I just checked with "ls -l /usr/bin/sudo". Here are the results after the chroot environment started and before I clicked next:
root@
root@
Adding 'local diversion of /sbin/initctl to /sbin/initctl.
root@
-rwxrwxrwx 1 999 999 136808 Aug 17 2016 /usr/bin/sudo
I don't understant the second line, it's there automatically. Then I clicked next, finish and booted the custom iso. Still the new iso has same problems. Can't install programs, don't have network, can't use sudo commands. Here are the result of "ls -l /usr/bin/sudo" in custom ISO's live environment:
-rwxrwxrwx 1 elementary elementary 136808 Aug 17 2016 /usr/bin/sudo
Since it's Elementary 0.4 Loki and Cubic version is probably of 2019 or 2018, I think it's probably a bug. Is there any command that I can use in chroot to bring back root permission and wifi connectivity?
Revision history for this message
|
#8 |
You are using an unsupported old version of Cubic.
(1)
Where did you get it from?
(2)
What is the output of the following command, run on your host machine?...
$ dpkg -l cubic
(3)
What OS and version are you running Cubic in (in other words, what is the OS and version of your host machine)?
Revision history for this message
|
#9 |
To create the live iso, I've used the official iso in live environment.
(1) Installed cubic from terminal using these 3 terminal commands:
sudo add-apt-repository ppa:cubic-
sudo apt update
sudo apt install cubic
(2) elementary@
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++
ii cubic 2020.02-62-r all Wizard to create a customized Ubu
(3) Host OS is ElementaryOS 0.4 [live], previously did the same with ElementaryOS 5 and 5.1 [once live, then again from installed version].
In ElementaryOS 5.1, the result of "dpkg -l cubic" is:
Desired=
| Status=
|/ Err?=(none)
||/ Name Version Architecture Description
+++
ii cubic 2021.06-52-relea all Wizard to create a customized Ubuntu Live ISO ima
While customizing Elementary5.1's ISO from 5.1's live environment, If I write "ls -l /usr/bin/sudo"
root@cubic:~# ls -l /usr/bin/sudo
-rwxrwxrwx 1 999 999 149080 Jan 31 2020 /usr/bin/sudo
Because it's still "999" instead of root, I guess it'll have the same issues in created ISO. So is there any way to change the permissions to root from chroot environment?
Revision history for this message
|
#10 |
Abdul,
[1]
The output you pasted in comment # 7 shows you are running a very old version of Cubic.
***But*** the output of `dpkg -l cubic` shows you have installed the most recent version: "2021.06-
This is conflicting information, so I think something is wrong with your installation of Cubic.
[2]
Regarding your question about changing file permissions: Certain files have very specific permissions and ownerships. It is almost impossible to set all the permissions and ownerships correctly, manually. Furthermore, there may be other issues with your ISO in addition to file permissions/
[3]
Let's try to figure out why your Cubic installation is behaving so oddly...
(a)
First, uninstall Cubic, and delete the application files just in case:
$ sudo apt -s autoremove --purge cubic
$ sudo rm -rf /usr/share/cubic
(b)
Remove (all) Cubic PPAs:
$ sudo rm /etc/apt/
(c)
Make sure your Cubic PPAs are removed. You should get NO output after executing the following command:
$ grep -rl cubic /etc/apt/
(If do you get output, let me know.)
(d)
Then, reinstall Cubic.
(Note: we need to install the software-
$sudo apt install software-
$ sudo apt-add-repository ppa:cubic-
$ sudo apt update
$ sudo apt install --no-install-
(e)
Finally, launch Cubic.
When the Cubic window opens, there will be a version number on the 1st page.
What version number do you see?
Revision history for this message
|
#11 |
As a test, I booted into the custom Elementary ISO I created in comment # 6.
I installed Cubic using the steps in part 3-d of comment # 10.
Then, I launched Cubic and chose to customize an older Ubuntu ISO.
(I chose an older ISO simply because I don't have enough memory in my virtual machine to customize the newer, larger ISOs).
I was able to successfully enter the virtual terminal environment in Cubic, and the ownership and permissions were correct:
You have entered the virtual environment.
root@cubic:~# ls -l /usr/bin/sudo
-rwsr-xr-x 1 root root 155008 Aug 27 2015 /usr/bin/sudo
If Cubic is installed correctly, you will see the same message.
Revision history for this message
|
#12 |
It's been some week, I've tried again with some other ISO.
This time, I used Ubuntu MATE 18.4 for testing. But getting the same message in chroot:
# ls -l /usr/bin/sudo
rwxrwxrwx 1 999 999 149080 Jan 31 2020 /usr/bin/sudo
Cubic version is shown as 2021.09.53 in About Cubic option. I can't really figure out if that's my hardware related issue or not. However, thank you for all your efforts.
Revision history for this message
|
#13 |
What is the output of
grep ^[^#] /etc/apt/
on your host computer ?
Revision history for this message
|
#14 |
mistakenly pressed the solve button. sorry about that.
Revision history for this message
|
#15 |
The output of
grep ^[^#] /etc/apt/
is:
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
/etc/apt/
Revision history for this message
|
#16 |
User accidentally clicked "Solved"
Revision history for this message
|
#17 |
[1] Please confirm these two points?...
(a) Your host computer is Ubuntu MATE 18.04.5
(b) You are customizing elementary OS 0.4 from 2016
(If, not let me know what are the two OSs?)
[2] When you get to the terminal page in Cubic, which of these two messages do you see?
(a) root@elementary:~ # You are in the chroot environment.
...OR...
(b) You have entered the virtual environment.
Once you respond, I'll see if I can download the two OS versions and try recreate your exact situation.
Revision history for this message
|
#18 |
Making the assumption that...
(a) Your host computer is Ubuntu MATE 18.04.5
(b) You are customizing elementary OS 0.4 from 2016
I downloaded and installed Ubuntu MATE 18.04.5 from...
https:/
I downloaded elementary OS 0.4 Loki from...
http://
TESTING
-------------------
The host OS (Ubuntu MATE) information...
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
The sources list for the host OS is...
$ grep ^[^#] /etc/apt/
/etc/
/etc/
/etc/
/etc/
/etc/
/etc/
/etc/
/etc/
/etc/
/etc/
/etc/
Installed Cubic version...
2021.
RESULTS
-------------------
I am able to customize elementary OS 0.4 Loki in Ubuntu-MATE 18.04.5 LTS without issue using Cubic 2021.09-54.
The permissions in Cubic are correct...
root@cubic:~# ls -l /usr/bin/sudo
-rwsr-xr-x 1 root root 136808 Aug 17 2016 /usr/bin/sudo
Revision history for this message
|
#19 |
ANALYSIS
-------------------
It's hard to tell what your issue is...
(1)
From your sources list, I notice you are running Cubic in a Live Environment.
/etc/apt/
This may be causing the issue, sine the Live Environment is not writable. Instead, install your host OS to an actual disk, or install it in a virtual disk in virtualization software such as VirtualBox. After you've installed your Host OS, then install Cubic.
(2)
This may be cause by the file system you are using. Are you using a mounted or remote file system?
Revision history for this message
|
#20 |
According to your suggestion, I've installed Ubuntu MATE 18.04.5 LTS on my HDD and performed the following:
$ grep ^[^#] /etc/apt/
/etc/
/etc/
/etc/
/etc/
/etc/
/etc/
/etc/
/etc/
/etc/
/etc/
/etc/
when trying to customize Elementary 0.4, the results in chroot:
# ls -l /usr/bin/sudo
-rwxrwxrwx 1 1000 1000 136808 Aug 17 2016 /usr/bin/sudo
Revision history for this message
|
#21 |
Which file system type is your working directory?
What is the output of the command
df -T
Revision history for this message
|
#22 |
[1] On your *host* computer, what is the output of the following command:
$ id
[2] Inside cubic, what is the output of the following command:
$ id
[3] When you get to the terminal page in Cubic, which of these two messages do you see?
(a) root@elementary:~ # You are in the chroot environment.
...OR...
(b) You have entered the virtual environment.
[4] What is the file system for your Cubic project directory (ext2, ext3, btf, etc)? (See Manfred's question in comment # 21).
Output of
$ df -T
[5] How do you start/launch Cubic ?
Revision history for this message
|
#23 |
[1] On my *host* computer, the output of the following command is:
$ id
uid=
[2] Inside cubic, the output of the following command is:
# id
uid=0(root) gid=0(root) groups=0(root)
[3] When I get to the terminal page in Cubic, I see:
(b) You have entered the virtual environment.
[4] The file system for your Cubic project directory (ext2, ext3, btf, etc) is NTFS, because I use that partition in my Windows instance too. (See Manfred's question in comment # 21).
Output of
$ df -T
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/sda3 fuseblk 217055228 114136400 102918828 53% /
tmpfs tmpfs 2014964 0 2014964 0% /tmp
tmpfs tmpfs 2014964 0 2014964 0% /dev
tmpfs tmpfs 2014964 0 2014964 0% /dev/shm
tmpfs tmpfs 2014964 4 2014960 1% /run
tmpfs tmpfs 402996 1380 401616 1% /etc/resolv.conf
tmpfs tmpfs 2014964 0 2014964 0% /sys/fs/cgroup
[5] How do you start/launch Cubic ?
I start cubic using the icon from Application menu.
I've finally found the reason why the problem happened, and successfully completed the customization without any issues. Thanks to Manfred, I've tried to create the project directory in the Host file system (ext4). Everything worked fine this time. What a relief!
Revision history for this message
|
#24 |
I'm glad it's working!
Manfred, thanks for stepping in and helping out!!!
Cubic is ~supposed~ to prevent you from proceeding when using an NTFS file system.
However, I now see that Linux reports NTFS as "fuseblk" (as in your output in comment #23).
I will have to add "fuseblk" to the list of restricted file systems.
Revision history for this message
|
#25 |
Fix released in version 2021.09-55-release.