Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Live iso (Xubuntu 32 bit 18.10) asks for password #200

Open
khurshid-alam opened this issue Jan 6, 2019 · 7 comments
Open

Live iso (Xubuntu 32 bit 18.10) asks for password #200

khurshid-alam opened this issue Jan 6, 2019 · 7 comments

Comments

@khurshid-alam
Copy link

I built a iso from Xubuntu 32 bit (18.10) iso. All I did was removing few packages, making it more slim. Everything went well. But then when I boot it asks for username and password. For official xubuntu iso, it was xubuntu and the password is blank. But it did not work for me. I did not create any user while in chroot mode.

Any idea what's happening here ?

@khurshid-alam khurshid-alam changed the title Live iso asks for password Live iso (Xubuntu 32 bit 18.10) asks for password Jan 6, 2019
@kamilion
Copy link
Owner

kamilion commented Jan 8, 2019

Right, that stuff is generally controlled at early boot from casper, before systemd loads -- you might have removed a package casper depends on.

Look around in /usr/share/initramfs-tools/

I think it's /usr/share/initramfs-tools/scripts/casper-bottom/25adduser

I had to muck around with things for my own customized ISOs.
https://github.com/kamilion/kamikazi-core/tree/master/resources/xenial/mods/usr/share/initramfs-tools

Don't forget to run 'update-initramfs -u' in your chroot if you make any changes to casper hooks or scripts.

Try the username 'ubuntu' with the password 'ubuntu' or blank. I recall that seems to work on many rebuilt ISOs.

Generally I rebuild Lubuntu, so I'm afraid I don't know as much about what the defaults Xubuntu's ISO uses during seed generation.

@khurshid-alam
Copy link
Author

In the chroot I don't have any user named xubutu or ubuntu. Only root and other system user exists in /etc/passwd. Is thia normal? What will happen if I create a user manually inside chroot with add user command ? At least that user should be available during live boot. No?

update-intramfs run multiple times during kernel update. But it did not solve my problem. Xubuntu iso is built I same way lubuntu does.

@kamilion
Copy link
Owner

There is no user in the ubuntu squashfs. Casper creates one early in boot.
Specifically: /usr/share/initramfs-tools/scripts/casper-bottom/25adduser
This is run while the ISO is booting, but before control has been passed to systemd.

If you create a user inside the chroot; you'll break the live boot scripts that create user 999 when the ISO boots and general havok will ensue. You'll also end up with an 'extra' user with the specified username as used on the ISO, post-installation. (After you run ubiquity.)

Until you run the ubiquity installer, there is no user other than root.
Casper will create a fresh user 999 as part of the ISO boot process.

@khurshid-alam
Copy link
Author

No I have /usr/share/initramfs-tools/scripts/casper-bottom/25adduser. I did not make any changes to casper hooks and scripts.

Which package installs those? May be I can try reinstalling those packages.

In your customized I don't see those files, so your recommendation is to remove /usr/share/initramfs-tools/scripts/casper-bottom/25adduser ?

@khurshid-alam
Copy link
Author

khurshid-alam commented Jan 21, 2019

I am setting live username from the gui like this

custmizer-gui

But even then it doesn't work, during iso rebuild I noticed this log:

Exportable Squashfs 4.0 filesystem, gzip compressed, data block size 1048576
compressed data, compressed metadata, compressed fragments, compressed xattrs
duplicates are removed
Filesystem size 1060137.79 Kbytes (1035.29 Mbytes)
40.75% of uncompressed filesystem size (2601342.63 Kbytes)
Inode table size 1275502 bytes (1245.61 Kbytes)
26.20% of uncompressed inode table size (4869035 bytes)
Directory table size 1343726 bytes (1312.23 Kbytes)
40.09% of uncompressed directory table size (3351633 bytes)
Number of duplicate files found 12465
Number of inodes 136778
Number of files 94671
Number of fragments 1248
Number of symbolic links 27959
Number of device nodes 0
Number of fifo nodes 0
Number of socket nodes 5
Number of directories 14143
Number of ids (unique uids + gids) 1
Number of uids 1
root (0)
Number of gids 1
root (0)
=> Checking SquashFS filesystem size
=> Creating filesystem.size
=> Creating filesystem.manifest
=> Creating md5sum.txt
=> Creating ISO
=> Creating ISO checksums
=> ISO md5 checksum: 9fe0d8b419fc39951db1ca5a62dc1c7e

Notice
Number of ids (unique uids + gids) 1

shouldn't there be other system groups present like sudo or cdrom? When I try with bodhibuilder system groups are present in the iso and it cleans passorwd, shadow and then set autologin. May be this issue has something to do with that?

@kamilion
Copy link
Owner

kamilion commented Feb 1, 2019

Hm, yeah, looks like something is certainly amiss there.

I honestly recall the username setting code to be somewhat rickety at best -- keep in mind that this Customizer is more or less a QT/Python rewrite of the original GAMBAS application in a graphical dialect of BASIC.

The last time username changes from the GUI was really tested was before I took over maintainership.

At this point, I use the customizer CLI to do almost all of my ISO builds, but I rarely invoke the GUI myself.
I'll try to set aside some time to debug the GUI and fix a couple long standing bugs like my use of 'is not' instead of !=, I've just learned more about python identity vs equality checks.

It's also possible that ubuntu's scripts have changed over the years too. I've been paying less attention to them now that systemd has replaced upstart (which was always a thorn in my side; I had supplemented upstart with supervisord, which is now also deprecated... sigh) and I really need to convert some of my own ISO mods away from shell scripts and into systemd units.

@khurshid-alam
Copy link
Author

khurshid-alam commented Feb 2, 2019

long standing bugs like my use of 'is not' instead of !=,

:(
May be that's what causing the bug.

At this point, I use the customizer CLI to do almost all of my ISO builds

Can you show how to do that for any Ubuntu iso. I can always help testing.

It's also possible that ubuntu's scripts have changed over the years too.

Which scripts ?

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants