nerun / remastersys

A tool for creating Live CD backups and remasters for GNU/Linux Debian.
GNU General Public License v3.0
73 stars 15 forks source link

Resolv.conf is missing #17

Open lmaudio opened 1 year ago

lmaudio commented 1 year ago

Resolv.conf is missing in remastered system after install. DNS/Internetconnection is broken through this.

I am using Linux Mint 21.1 MATE, remastersys 4.9, dist-mode

Internetconnection was working before remastering and resolv.conf there..

lmaudio commented 1 year ago

Resolv.conf and its folder is missing in /etc of the livesystem too! So it was maybe not copied in distmode?!?

What should i edit in remastersys, to avoid this next time?? Because the rest works really fine and stable. Help please.

lmaudio commented 1 year ago

Something with systemd!?

lmaudio commented 1 year ago

Hey sorry, i have to know: is the resolv.conf or systemd "touched" by remastersys distro-mode or not! I need this information to find a way to fix it next time..

nerun commented 1 year ago

Hey, I really appreciate all the bugs you've been reporting. Thank you for that. But I have a life that pays my bills. Remastersys is just a hobby for me. I'm not going to quickly answer every question you ask. I won't be at your complete disposal.

That said, you can open the /home/remastersys folder and look for the dummysys folder. If you want be sure that all your custom system settings will be in live media, create a CDFS first (dist mode with cdfs option), then look inside dummysys folder, edit, copy and paste everything you want manually, then use dist mode with iso option.

You can open a file browser as Nautilus/Nemo with root privileges and browse dummysys (because all files there belongs to root). Or, you can chroot (like CUBIC does).

I will take a look in all issues, someday. Testing remastersys is hard: create dozens of images, loading VMs, running ISO, test installation etc.

If something is not copied, there should be an issue in /bin/remastersys script (this is the main script). I will take a look there. But, for now, you should check manually dummysys.

nerun commented 1 year ago

From remastersys script, lines167-172:

   if [ "$1" = "dist" ]; then
        rm -f $WORKDIR/dummysys/etc/X11/xorg.conf
        rm -f $WORKDIR/dummysys/etc/resolv.conf
        rm -f $WORKDIR/dummysys/etc/hosts
        rm -f $WORKDIR/dummysys/etc/hostname
    fi

So yes, you are right, it's copied, but deleted in dist mode. So, for now, first use sudo remastersys dist cdfs, then copy these 4 files and paste them manually in dummysys, then use sudo remastersys dist iso. These options are also available in GUI, of course.

lmaudio commented 1 year ago

Thank's for answering and taking your time. Yesss/many images, long nights too. As we build last image in distmode there should be cdfs/dummysys to edit.

But files like /etc/resolv.conf are systemlinked e g.to systemd and just copy n paste as root breaks that!?

I will comment the lines out in script and do it again.

Last night i build 4 images to test..#marathon

lmaudio commented 1 year ago

Comment the lines out (167-171) brings the result of a crashing remastersys script. Should i delete this files or how to fix it right?

nerun commented 1 year ago

I am out of ideas...

lmaudio commented 1 year ago

Should i comment it out or just deleting the lines in script you wrote above?

nerun commented 1 year ago

Should i comment it out or just deleting the lines in script you wrote above?

Both have the same effect.

lmaudio commented 1 year ago

Thank you sooo much. I will build one iso in distmode without deleting resolv.conf and start to test then all images to check, which settings and way brings the best results.

Last question: if i don't delete the hostname-file in distmode, will everybody able to choose different username and hostname later or is the result that just this hostname is to used later after install!?

Best regards and wishes!

lmaudio commented 1 year ago

Hi there! Could you show me please how to edit these files right to comment them out?

I don't wanna delete resolv.conf in distmode while this breacking Internet/DNS for Linux Mint in remastered system! Yes, i know. Your program is for Debian, but you just should know!?

What is with the fi!? Could you show me how it is right to disable or delete these lines right in your script? when i edit it, remastersys GUI don't really works. Thank you.

if [ "$1" = "dist" ]; then rm -f $WORKDIR/dummysys/etc/X11/xorg.conf rm -f $WORKDIR/dummysys/etc/resolv.conf rm -f $WORKDIR/dummysys/etc/hosts rm -f $WORKDIR/dummysys/etc/hostname fi

lmaudio commented 1 year ago

Hello. Could you bring a Version that don t touches resolv.conf and other Internet relevant files in distmode please??? Would be sooo great for me ..and other Linux Mint users..

lmaudio commented 1 year ago

..or how to systemlink resolv.conf to /run/systemd/resolve/resolv.conf in the cdfs files before making an ISO?? You have any idea? Or a command?

lmaudio commented 1 year ago

sudo rm /etc/resolv.conf

sudo ln -s /run/systemd/resolve/stub-resolv.conf /etc/resolv.conf

Is the solution in running system.

But how to get this in /etc/resolv.conf that is without systemlink in Cdfs-folder of remastersys??

lmaudio commented 1 year ago

Others idea: i could load my with remastersys build image in Cubic and have there the chroot-option to modify things with terminal.

But jf i try to delete and create new resolv.conf with link to systemd i get this errormessage:

failed to create symbolic link 'etc/resolv.conf' file just exists

rm: cannot remove 'resolv.conf': device or Ressource busy.

Do you know exactly which command to choose to force cubic in chrootmode to delete the old and empty and not linked resolv.conf, so that the other command of creating a linked resolv.conf could happened!?

Hobbyist. !)

lmaudio commented 1 year ago

..to delete or comment out your 4 lines to NOT delete resolv.conf in distmode just brougt me evetytime a Brocken remastersys.

I just open as admin with editor, comment out or delete the lines and saved this.

Anything to recognize more??

lmaudio commented 1 year ago

Puh, i think we got it now!

I took the customimage made with remastersys and load it into cubic. There i copied my resolv.conf with chroot in /etc/skel used the command of systemlink from above and made a new image. And hey, now the Internet/DNS works fine in installed system.

I did this way in cubic, because i had deleted the cdfs-files from remastersys, but i think this all could work too like you said: to copy (as admin!?) the existing resolv.conf from System /etc to the cdfs-folder of remastersys. But i could not test it..

lmaudio commented 1 year ago

So hey, it's great: remastersys 4.9 works stable with Linux Mint 21.1 64bit Mate in Backup-Mode and in distmode you just have to repair the resolv.conf in livesystem.

Thank you so much for helping us.

Here is our little distro, made with remastersys and cubic:

https://qstudio64.tumblr.com

Good luck and a lot of fun with the development of remastersys.

Stay tuned.

Chalee