Author Topic: Arch Linux root password  (Read 4105 times)

Zaur

  • Newbie
  • *
  • Posts: 4
    • View Profile
Arch Linux root password
« on: August 26, 2017, 07:59:34 am »
I have a SL-C3200 with Arch Linux. I can logon to a user account but I don't have the root passsword. Is there a way to reset the root password? I can't see a Grub menu to allow me to use one of the common methods to do so. Thanks

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1085
    • View Profile
Arch Linux root password
« Reply #1 on: August 26, 2017, 09:25:21 am »
Hi and welcome!

The default root's password is root. You can change it after logging in using

Code: [Select]
sudo passwd root
There's no Grub on Alarmz; kexecboot is used as a boot loader instead, but it doesn't have a recovery mode like Grub.

Varti
« Last Edit: August 26, 2017, 11:51:48 am by Varti »
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

Zaur

  • Newbie
  • *
  • Posts: 4
    • View Profile
Arch Linux root password
« Reply #2 on: August 26, 2017, 03:25:37 pm »
Thanks, Varti. I should have been clearer in my original post. Unfortunately the password is not the default one (root), which is why I can't access root. Without a recovery mode, I'm not sure what else I can do.

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1085
    • View Profile
Arch Linux root password
« Reply #3 on: August 26, 2017, 04:17:15 pm »
I see... Is this on a freshly installed Arch Linux? AFAIK the default root password has always been root, at least on the latest two Zaurus releases, but it might have been different on older releases, greguu (Alarmz's maintainer) might shed a light on this.

I'm not aware of any way of recovering/changing the root password on Alarmz, so the only solution would be to reinstall it from scratch.

Varti
« Last Edit: August 26, 2017, 05:47:09 pm by Varti »
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

Zaur

  • Newbie
  • *
  • Posts: 4
    • View Profile
Arch Linux root password
« Reply #4 on: August 26, 2017, 04:38:07 pm »
Thanks, Varti. It's not a fresh install but an inherited piece of equipment. At some point the root password must have been changed. It looks like I'll have to reinstall Alarmz. I was trying to avoid that but you've confirmed what I thought was the case. I'm not familiar with Alarmz but it will be interesting to learn its unique attributes.

Varti

  • Administrator
  • Hero Member
  • *****
  • Posts: 1085
    • View Profile
Arch Linux root password
« Reply #5 on: August 26, 2017, 06:35:52 pm »
Actually, it might be possible to change it by following these instructions:

https://wiki.archlinux.org/index.php/reset_root_password

On the Zaurus, you can append the
Code: [Select]
init=/bin/bashpart in the boot/boot.cfg file, at the end of the APPEND label. I have tried it on my SL-C1000, by plugging the SD card where Alarmz is installed on my laptop and modifying the file there. I have put the SD back in my Zaurus and it has directly booted bash, skipping the rest of the boot procedure. Unfortunately I have not managed to remount the partition as read/write, since a wrong keymap was loaded and I wasn't able to type the / character.
In your case I believe that Arch Linux is installed on your internal Microdrive, so you'll need to first install Alarmz on an SD card, boot it via kexecboot, mount the root filesystem on the Microdrive (it should be /dev/sda1), modify the boot/boot.cfg file there as explained above and reboot, this time booting the system from the Microdrive.

Varti
Planet Gemini PDA WiFi/LTE with Mediatek x27
SL-C1000 running Arch Linux ARM May2017, K30225 Wi-Fi CF Card, 64GB SDXC card
and many other Zauruses!

Zaur

  • Newbie
  • *
  • Posts: 4
    • View Profile
Arch Linux root password
« Reply #6 on: August 27, 2017, 03:46:01 am »
Many thanks, Varti. I'll take a look later and let you know.  

greguu

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 393
    • View Profile
    • http://github.com/greguu
Arch Linux root password
« Reply #7 on: August 29, 2017, 01:15:23 am »
Quote from: Zaur
Many thanks, Varti. I'll take a look later and let you know.  


Zaur, all default rootfs released here come with the default password "root". If it was changed and you inherited the device I would reinstall from scratch as a good practice. If you do not want to reinstall, just boot from a SD card using the current rootfs (follow the guide https://www.oesf.org/forum/index.php?showtopic=34421) and then "chroot" to the internal CF card and do a "passwd". You will find help on the ArchLinux wiki on how to chroot. https://wiki.archlinux.org/index.php/change_root
« Last Edit: August 29, 2017, 01:18:43 am by greguu »
Gemini-PDA (Stock Android) / LG Nexus 5 (Sailfish OS) / Nokia N9 (MeeGo/Harmattan)
Sharp Zaurus C3100 (Borzoi) - Void Linux (voidz) Kernel 5.0.0 - Hardware (Buffalo CF LAN, DLink 660 CF WiFi, ASIX AX88772 USB Ethernet)