Manjaro XFCE 20.0.3 - Persistent USB - released

Well it was a long time ago. Maybe I find time to spin a new one …

1 Like

I booted to the tty1, manually installed the xfce desktop, but am unable to log in to any user account. I created the account using useradd -m chris -p password
but now that I booted into the xfce login screen, I cannot login.
Help would be appreciated

Edit:

I looked again at the user file and I think the problem was it wasn’t actually configured to save the passwords.
All working now

TIP for next time:
When you use a preset (like manjaro-xfce ) the USER will be created automatic. You only export the ALMA_USER for alma. Alma will ask you for the password when it is needed:

sudo su
export ALMA_USER=myUsername
alma create --presets ./presets/xfce-manjaro

But beforehand you have to download the presets to the directory you choose to start alma in.
P.S.: and the user is in sudoers :+1:

I did not name the usb-Drive when starting alma, but selected it inside alma from a list. Maybe this was the difference.

Oh! I click on the word direct below the paragraph that talks about a downloadable image and then it takes me to a page where I can download the ready-made USB-Image. I wish that had been more clearly explained.

Today the image is manjaro-xfce-20.0.3-20200704-USB8GB-unstable.img.gz. The forum will not permit me to put the link to this image. It is now saying 4hours to download the 1.6GB file.

I was also able to generate a working live USB with no GUI desktop on a Manjaro PC with the following:

sudo pamac install alma-git

ls /dev/disk/by-id/usb*

sudo alma create /dev/disk/by-id/usb-Generic_USB_Flash_Disk-0:0

Then create a newuser with root privileges and install a GUI desktop.

What do you mean? Links?

I wouldn"t bother, that is quite old and the updates alone will probably be the same size on top of that.

Yes, the link for the download image page is a sort of paperclip symbol. A link in a chain, I guess. The link takes me to a specific image file generated in 2020. Clicking on Description takes me to a community files page with several iso file images, some generated in 2021.

Yes. Updating that image did require over a hundred updates. Gparted was able to expand my partition on the USB to its full capacity.

So I just tried getting this working today, had a few issues and so I will document how I got around them. I am using the iso file [1] that was found in the original post (as of 20 may 2021), and I burned it via etcher.

No wifi connection

Use nmcli to connect to wifi, I followed a guide [2] which boiled down to running these commands in the shell:

nmcli device wifi rescan
nmcli device wifi list
nmcli device wifi connect SSID-Name --ask

No Sudo Access

As others have mentioned the default user manjaro doesn’t seem to have the ability to switch to the root user. I tried running sudo pacman -S nmapplet and it said that the user was not in the sudoers file.

To get around I used @Jazzlike-Joke 's information to login to the user account from the main xfce login screen (I was logged in as manjaro, and then I just pressed logout and then chose other from the drop down and typed in root as the user, no password was necessary).

After doing that I was able to do stuff as root, so the first thing I did was to change the root password by using passwd.

Then I tried to edit the sudoers file with visudo, it turns out that visudo couldn’t work because vi wasn’t installed, so I started off by just updating everything with pacman -Syu (this took a while for me, an hour or two, so be prepared), then ran pacman -S vi.

After vi was installed I edited the sudoers file with visudo and uncommented the line so that members of the group wheel could execute any command. (I knew that would work because I saw in user.toml that the manjaro user was added to that group).


Hopefully @philm can make it so that we don’t have to manually add this user as sudo, also if you can prepackage nmapplet into the os that would be great for new users who are not familiar with nmcli (I think normal manjaro xfce comes with nmapplet)


Links
(Apparently I can’t post links on the fourm yet, so I have to put a space between the h so it doesn’t think it’s a link)

  1. h ttps://osdn.net/projects/manjaro-community/storage/xfce-usb/20.0.3/manjaro-xfce-20.0.3-20200704-USB8GB-unstable.img.gz/
  2. h ttps://nullr0ute.com/2016/09/connect-to-a-wireless-network-using-command-line-nmcli/

When I find time I might create a newer image out of this. Maybe we need to adjust things. Let’s see …

1 Like

Well, something weird just happened
While exiting alma chroot on an encrypted partition, there was an increase in disk activity. And next time I reboot I notice some files are gone: entirety of Documents and .vim ; also all gnome extension configs.
Nothing else was going on on my PC, so I think it’s the only culprit

EDIT: Ah, also /home/timeshift folder with backups is also gone

It has happened once more, now on “create”.
I was able to catch the error

2021-05-23T15:00:33.505Z INFO alma > Unmounting filesystems 2021-05-23T15:00:33.580Z WARN alma::storage::mount_stack > Unable to umount /tmp/.tmpm1XgCf: EBUSY: Device or resource busy Device alma_root is still in use. 2021-05-23T15:00:33.633Z WARN alma::storage::crypt > Error closing alma_root Error: Failed unmounting filesystem: /tmp/.tmpm1XgCf, EBUSY: Device or resource busy
Sadly without debug :frowning:
After this, same folders got deleted.
So when it can’t unmount encrypted partition, it wreaks havok on other ones

I beg your pardon but where to download your USB-image? (no link under the bold text)

It’s at the bottom of the post, with link text “direct”.

I followed step by step the instruction to create USB persistent Manjaro and the script ran till the end and I had the succesfull installation message. But when I try to boot I’ve login and password request and I do not really know how to setup; I tried with manjaro - manjaro input, but no way. I read the advice of [@ChrisSaladin] about creating the account (using useradd -m username -p password), but I wonder when and where set up it (during install process? any way seems that Chris patch won’t work).
I do not think that Alma asked the password setting over a running installation also 'couse I really could not follow the entire process on the screen (it took on my old laptop quite an hour)

"Alma will ask you for the password when it is needed:
sudo su
export ALMA_USER=myUsername
alma create --presets ./presets/xfce-manjaro
"

So … is there some hope to set password as suggested for getting root privileges over a newly created usb? (regarding the suggestions of [@evandro]). And how to proceed?

You can plug the flash drive in a PC and edit
/etc/passwd
change manjaro:x:1000:1000::/home/manjaro:/bin/bash
to
manjaro:x:0:0::/home/manjaro:/bin/bash

so you are root now

Is any way to set the password there?

If not, I could evaluate to restart by the beginning the creation of a new USB but I’d like to know how to solve in advance the login gap.
Trust me it’s really frustrating

Thanks for your patience

EDIT:
The release I installed has already

manjaro:x:0:0::/home/manjaro:/bin/bash
in: /etc/passwd

and effectively, if I digit “root” (enter) as user I have “root … etc” on next line prompt.
So it seems I can run some command as root (“reboot” works …)
so …

useradd -m username -p password

???

You may have a look at:

Google will help translating

I replied the procedure over two USB (16 and 8 Gig) The installation went to the end asking and recording my user logs, and I have the following last lines:

passwd: password updated successfully
+ usermod -G users,lp,video,network,storage,wheel,audio -a dante
+ echo '%wheel ALL=(ALL) ALL'
+ systemctl enable lightdm
Created symlink /etc/systemd/system/display-manager.service → /usr/lib/systemd/system/lightdm.service.
+ systemctl enable apparmor
Created symlink /etc/systemd/system/multi-user.target.wants/apparmor.service → /usr/lib/systemd/system/apparmor.service.
+ systemctl enable snapd.apparmor
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.apparmor.service → /usr/lib/systemd/system/snapd.apparmor.service.
+ systemctl enable snapd
Created symlink /etc/systemd/system/multi-user.target.wants/snapd.service → /usr/lib/systemd/system/snapd.service.
 2022-02-04T08:39:43.829Z INFO  alma              > Performing post installation tasks
Created symlink /etc/systemd/system/multi-user.target.wants/NetworkManager.service → /usr/lib/systemd/system/NetworkManager.service.
Created symlink /etc/systemd/system/dbus-org.freedesktop.nm-dispatcher.service → /usr/lib/systemd/system/NetworkManager-dispatcher.service.
Created symlink /etc/systemd/system/network-online.target.wants/NetworkManager-wait-online.service → /usr/lib/systemd/system/NetworkManager-wait-online.service.
 2022-02-04T08:39:44.173Z INFO  alma              > Configuring journald
 2022-02-04T08:39:44.173Z INFO  alma              > Setting locale
Generating locales...
  en_US.UTF-8... done
Generation complete.
 2022-02-04T08:40:14.423Z INFO  alma              > Generating initramfs
==> Building image from preset: /etc/mkinitcpio.d/linux54.preset: 'default'
  -> -k /boot/vmlinuz-5.4-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.4-x86_64.img
==> Starting build: 5.4.176-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [keyboard]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: qla2xxx
==> WARNING: Possibly missing firmware for module: qed
==> WARNING: Possibly missing firmware for module: qla1280
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.4-x86_64.img
bsdtar: Failed to set default locale
bsdtar: Failed to set default locale
==> Image generation successful
==> Building image from preset: /etc/mkinitcpio.d/linux54.preset: 'fallback'
  -> -k /boot/vmlinuz-5.4-x86_64 -c /etc/mkinitcpio.conf -g /boot/initramfs-5.4-x86_64-fallback.img -S autodetect
==> Starting build: 5.4.176-1-MANJARO
  -> Running build hook: [base]
  -> Running build hook: [udev]
  -> Running build hook: [keyboard]
  -> Running build hook: [consolefont]
==> WARNING: consolefont: no font found in configuration
  -> Running build hook: [block]
==> WARNING: Possibly missing firmware for module: bfa
==> WARNING: Possibly missing firmware for module: qla2xxx
==> WARNING: Possibly missing firmware for module: qed
==> WARNING: Possibly missing firmware for module: qla1280
  -> Running build hook: [filesystems]
  -> Running build hook: [keyboard]
  -> Running build hook: [fsck]
==> Generating module dependencies
==> Creating gzip-compressed initcpio image: /boot/initramfs-5.4-x86_64-fallback.img
bsdtar: Failed to set default locale
bsdtar: Failed to set default locale
==> Image generation successful
 2022-02-04T08:42:36.983Z INFO  alma              > Installing the Bootloader
Installing for i386-pc platform.
grub-install: warning: Attempting to install GRUB to a disk with multiple partition labels.  This is not supported yet..
grub-install: warning: Embedding is not possible.  GRUB can only be installed in this setup by using blocklists.  However, blocklists are UNRELIABLE and their use is discouraged..
grub-install: error: will not proceed with blocklists.
Error: Failed to install grub

Caused by:
    Bad exit code: exit code: 1

At the real end, there’s no way to have the usb read by my Lenovo i5 desktop PC (I ran the install routine from my old Olidata stainer Athlon 3000 laptop with Manjaro installed over HD) under BIOS setting attempts with csm enabled or not and both UEFI or Legacy set checked.
I have got that loading presets is mandatory for having the username and password access.
Now my question is why my first installation (the one without presets) let the same PC read the same (reformatted) usb key (but as I explained above I can’t enter the system for the password setting lack) and the one with presets up won’t recognize it. Seems a Grub problem, since I have windows and ubuntu installed over two separated HD on my desktop. Any idea? (thanks again all)

I did my install months ago.
BUT sometimes i had to try 2 times to succeed (don´t know why)

Otherwise you may talk to @philm because he owns the project alma.

Finally I’ve been able to built up my portable persistent Manjaro xfce usb. I simply retried the same steps suggested in the link provided by @andreas85 (thanks a lot) without changing anything compared to the previous attempts. I only wiped and prepared the same usb with gparted. Good luck! (always learning)

1 Like

Just found this project the other day and I figured out how to build a working openbox usb stick but I ran into trouble with AUR (aur.toml), no way to find the right password for sudo when asked for. Is this feature actually working? If anyone can help, thanks. Here’s the command I’m using:

sudo ALMA_USER=UserName alma create /dev/sdb --presets ./presets/user.toml ./presets/xorg.toml ./presets/openbox.toml ./presets/pamac.toml ./presets/aur.toml

Today i tried to create a new usb-stick (128GB).

But manjaro changed over time @philm

Update 14.10.2022 :

You have to change the content of one file to prevent an ERROR:
Filename: ./alma/xfce-branding.toml
remove the following entries:

"manjaro-documentation-en", "manjaro-firmware", 

These are no longer present in the repos of manjaro

Andreas :footprints: