It seems that you're using an outdated browser. Some things may not work as they should (or don't work at all).
We suggest you upgrade newer and better browser like: Chrome, Firefox, Internet Explorer or Opera

×
avatar
HeresMyAccount: EDIT: By the way, the article says it's good for making new distributions, and I was wondering, is that all a Linux distribution even is - someone just takes a previously existing distribution, changes some settings, changes or adds new code, installs and uninstalls whatever, possibly makes a new or altered GUI, and then puts it all into an ISO as a new installer to give out? Or have I overlooked anything, or am I just way off?
Many people do call such a thing a new distribution. In any case, Ubuntu is really just Debian with different repositories and defaults; if you look deep into the guts, it's all the same. For example, the debootstrap program can be used to install a root filesystem of any Debian based distribution in a directory, not just Debian itself.

On the other hand, you have different "upstream" distributions that are not related to one another, and which work very differently. Fedora uses a different package format than Debian (.rpm as opposed to .deb). Arch uses still another format. Gentoo differs even more radically; it's a source based distribution, which means most software is compiled from source when you install or upgrade it (upside: more customization, downside: installing software takes a lot longer). Tiny Core Linux uses its own package system and runs from the initramfs (that is, from RAM) instead of running from a hard drive. Alpine Linux goes even further and uses a different C library (which means you can't take a binary linked with glibc from another system and run it on Alpine; this means that GNU/Linux game you got from GOG isn't going to work on Alpine). Then there's even buildroot which can be used to build embedded Linux systems from scratch, allowing you to choose things like which C library gets used (but, of course, compiling can take a while); buildroot does all the work for you, including downloading the source code and building the needed cross compiling toolchain.
But technically, can't all that stuff be done just by modifying an existing distribution? I mean it's not like they write a whole new kernel or anything, right? And in pretty much all versions of Linux, I think they use a huge percentage of the same commands, and they tend to share a lot of the same options for which GUI to use, etc. I mean, I may be wrong about this stuff, but I'm just saying how it seems to me, and I don't know whether it's accurate.

But for altering an installation file, I would think that I'd need to actually be running it in live mode, perhaps in a VM, while doing so, at least for some things. For example, if I needed to run commands to download/install new software or just to change configurations and do things that can be done with commands, if I don't want to literally go in and cherry pick every file and open a bunch of settings files to edit them manually in the case when there's a command to do all of that stuff more automatically, right?

Like for example, I don't want this installation to have internet access, but I may need to temporarily allow that, because I want to install some software that will need to be downloaded, but by default, Mint isn't compatible with my WiFi router, so I had to download a package of it from GitHub and store it on my Windows partition, then inside of Linux, install it from there, and then download and install other software. So I'd be able to do all of that stuff and have it modify the installer ISO accordingly to reflect those changes, right?

EDIT: You know, I'm reading this article and it doesn't really explain what some things mean but it's more like, do this step, do that step, etc. For example, it says:

sudo rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd

But it doesn't say what this casper thing is or why it's excluding it. Then it says things like:

On more recent releases, you can avoid this issue by just binding /run instead, which will pull your host's resolvconf info into the chroot

But it hasn't explained what a resolveconf or a chroot is, or why /run is evidently a special directory. And I'm less than 10% into the thing (and that includes the notes at the beginning to just introduce the topic), so are there also resources anywhere that will explain all of this, or is it going to be a tough job of searching stuff about every line that I encounter, to find out what every little nuance of it is doing?

I'm not trying to be difficult here - really, I very much appreciate all the help that you've given me, but it's just that I keep encountering things that end up frustrating me in one way or another, and I've been at this stuff for so long that I'm really getting anxious to finally be able to finish it, but I don't know if that will happen any time soon (my goal is at least by the end of the year).
Post edited October 25, 2020 by HeresMyAccount
avatar
HeresMyAccount: EDIT: You know, I'm reading this article and it doesn't really explain what some things mean but it's more like, do this step, do that step, etc. For example, it says:

sudo rsync --exclude=/casper/filesystem.squashfs -a mnt/ extract-cd

But it doesn't say what this casper thing is or why it's excluding it. Then it says things like:

On more recent releases, you can avoid this issue by just binding /run instead, which will pull your host's resolvconf info into the chroot

But it hasn't explained what a resolveconf or a chroot is, or why /run is evidently a special directory. And I'm less than 10% into the thing (and that includes the notes at the beginning to just introduce the topic), so are there also resources anywhere that will explain all of this, or is it going to be a tough job of searching stuff about every line that I encounter, to find out what every little nuance of it is doing?
I think I can explain this.

casper is Ubuntu's way of booting live CDs. It handles mounting the squashfs image and setting up the overlay. The command in question copies every file from the Live CD *excepf* for the file containing the compressed root filesystem, which is most likely the biggest file on the CD, so excluding it saves time and disk space.

There's a file located at /etc/resolv.conf which contains the computer's DNS settings, and it has to be accessible in order for DNS lookups to work. If you look in the file, you'll see something like "nameserver 1.1.1.1", which means that the computer is using 1.1.1.1 as its DNS server (this server is run by Cloudflare; if you trust Google more than Cloudflare there's 8.8.8.8). If you don't have the resolv.conf file accessible inside a chroot, you won't be able to do DNS lookups from inside it, and almost everything you do that connects to the Internet, including package managers, needs DNS.

A chroot is something like a virtual machine, except only the file system is virtualized. Basically, the chroot command (which requires root) will change the root directory of the current process and its children. This means that you can install another Linux distribution (provided it's compatible with the kernel), enter the chroot, and with a few bind mounts, run that distribution alongside the main one. One example of this is if you use Alpine Linux, but need to run software that requires glibc. Another example is that you can run a 32-bit chroot on a 64-bit system, or even vice versa (provided that you are using a 64-bit kernel); with qemu-user it's even possible to run a chroot of an entirely different architecture! (The latter comes in handy if you've messed up the installation on your Raspberry Pi's SD card.)

/run is a directory mounted as a tmpfs, used to store data that is only relevant when the system is running and need not be persisted. Details can be found at:
https://lists.fedoraproject.org/pipermail/devel/2011-March/150031.html
The reason resolve.conf might be found in /run is that, on a typical configuration, the computer uses DHCP to get its IP address and DNS configuration on boot, and the DNS settings are irrelevant until the next boot, so the developers of Ubuntu must have decided, at some point, to replace that file in /etc with a symbolic link to a file stored somewhere under /run.

Edit: If you just want to do what you're trying to do with minimal fuss, I would seriously recommend just using bootcd, perhaps from a Debian VM.
Post edited October 25, 2020 by dtgreene
avatar
HeresMyAccount: are there also resources anywhere that will explain all of this
No. It's going to be as long as the bible if they assume the user knows nothing and wants to know everything. This is documentation for technical people who can be assumed to know something about Linux or at least have the know-how to look things up if they care. Obviously nontechnical people who are new to Linux are not going to be customizing live CDs.

it doesn't say what this casper thing is or why it's excluding it.
You don't need to know what casper is for these instructions to be useful, so it does not explain it. But if you want to know, you can look it up.

And no, it's not excluding casper, it's excluding filesystem.squashfs from the casper directory. Why? Well, sometimes you just have to read on and connect the dots yourself. In this case, the very next step after running rsync is to extract that same filesystem.squashfs and get into editing it. Later on you pack it all up into a new filesystem.squashfs again. So obviously there is no point rsyncing the original version of filesystem.squashfs on to the to-be-new-ISO-image since you'll be overwriting it with a custom version anyway. (If you read dtgreene's posts above, you can also guess what filesystem.squashfs is used for, in case it wasn't obvious from following the guide)

But it hasn't explained what a resolvconf or a chroot is, or why /run is evidently a special directory.
Again, you can connect the dots yourself. Let's try it. First, there's a big warning that says you'll lose name resolution. And then it explains that /etc/resolv.conf must point to /run/resolvconf/resolv.conf, and that if you need name resolution within chroot, you should temporarily edit that file. Even without performing a google search (or man page lookup) you should be able to make the conclusion resolv.conf is where you configure name resolution. Let's see what man resolv.conf says: resolv.conf - resolver configuration file. The resolver is a set of routines in the C library that provide access to the Internet Domain Name System (DNS). Who would have guessed?! What about /run? No, nothing there implied or suggested it is a special directory. It's just where the resolvconf puts its runtime configuration. If you want to learn more you can look that up too: http://manpages.ubuntu.com/manpages/trusty/man8/resolvconf.8.html

Finally, chroot. I'd totally forgive you for not guessing what this is. But let's imagine for a second that you don't want to look it up, you just follow the steps. Well one of the steps is the chroot command. If you look around and see what happens after that, you might have lost name resolution if you didn't set up resolv.conf before it. And you'll see that all the files and things you put/mounted into the directory you passed to chroot appear at the root directory after running that command. Now you can make a pretty good guess: it changes the root directory. Now if you check the man page, you'll find a very short and to-the-point explanation: Run COMMAND with root directory set to NEWROOT. Woohoo. There's even a wikipedia page about it, just one Google search away, just as there is for resolvconf.

is it going to be a tough job of searching stuff about every line that I encounter, to find out what every little nuance of it is doing?
No, looking things up in a man page is not a tough job. Usually it takes about as long as typing man resolv.conf (or typing resolv.conf in google and finding the first most relevant result among the top three hits or so) and reading a few lines. We're talking seconds here. And as usual, you can pretty much follow the steps even if you don't understand them all.
Post edited October 25, 2020 by clarry
Well, thanks a lot for those explanations, both of you. And clarry, I'm sorry if I seem like an idiot. The thing is, on the one hand, I'm extremely good at math and logic problems, and I can understand things of pretty much limitless complexity when it comes to programming and the like. But on the other hand, I guess I'm not really well-rounded in some ways. I've always found that those very specific niche skills are pretty much my only skills, and though I can understand anything, no matter how complex, as long as it's explained adequately in written or verbal form, if it's not then I really have a hell of a time trying to intuitively figure it out, and for some reason, whenever I search for stuff, I don't know if it's bad luck, bad search terms, or the fact that I'm often looking for something so esoteric that there may literally be NO information about it on the entire internet, or a combination of all of these things, but whatever the case, I find that I really have to dig practically forever just to find the tiniest hint of the information for which I'm looking. So for these reasons, I suppose I can seem naive and maybe even stupid.

EDIT: The more I look at this thing, the longer it seems and the more confusing it becomes. I think I may look into the possibility of bootcd (despite the name, it works with USB also, right?). Either that or maybe I'll just install the normal way and then make everything read-only when I'm done with it (though I may try Porteus instead of Mint, because it seems more minimal and possibly more compatible with what I'm trying to do, but I'm not sure). In any case, as long as I can get everything set up how it needs to be, and make sure that there's very little or preferably NO wear and tear on the drive, so that it can be used permanently, that'll be fine for what I need.

By the way, I just looked up "bootcd" and found "Hiren's BootCD PE" and "Ultimate Boot CD". Which one is it? Actually I guess it's not Hiren's because that one's supposedly for Windows, but I suspect neither one may be correct. In which case, I can't find the right one at all (see what I mean about my inability to find things for which I search?).
Post edited October 25, 2020 by HeresMyAccount
avatar
HeresMyAccount: for some reason, whenever I search for stuff, I don't know if it's bad luck, bad search terms, or the fact that I'm often looking for something so esoteric that there may literally be NO information about it on the entire internet
Well we've all been there, I still run into situations where I just can't think of the right search terms.

In this case though, chroot, resolv.conf, and resolvconf are all perfectly good search terms on their own; all are also man pages you would find on an Ubuntu installation. casper is also a man page, but it's the odd one out in that it is something Ubuntu-specific and you'd probably have to look up ubuntu casper on Google to get anything relevant. In general, if the name of a command or config file or thing alone does not bring useful results, then try the same search term plus linux or ubuntu, and your chances of finding relevant results go up ninetyfold.

I believe if you had tried, you'd have found most of the answers here ;-) Of course there's nothing wrong with asking but I think it's best to try a quick search or two first and then if that doesn't clear things up at all, go ahead and ask. Long term, you learn a lot more this way, and you get better at it too. Even just knowing that things like chroot and resolv.conf exist on a typical Linux system and can be looked up in the system's man pages will save you a crapton of time and questions later.

Btw, I don't know much about Ubuntu, and today is the first time I heard about casper. I just look things up.

Remember what you asked about xed? I've never used xed, I'd never heard of xed until you asked about it. So I looked it up, downloaded the source code, and looked up the answer for you.

avatar
HeresMyAccount: By the way, I just looked up "bootcd" and found "Hiren's BootCD PE" and "Ultimate Boot CD". Which one is it? Actually I guess it's not Hiren's because that one's supposedly for Windows, but I suspect neither one may be correct. In which case, I can't find the right one at all (see what I mean about my inability to find things for which I search?).
dtgreene mentioned it's a tool on debian so I'd start with "debian" "bootcd".
Post edited October 25, 2020 by clarry
Well, man bootcd and whereis bootcd give me nothing, so I assume that it's not installed, but I found this:

https://tracker.debian.org/pkg/bootcd

It seems to be the only really helpful and relevant link. I clicked the links under the Source and Binaries headings but they just send me to huge lists of other links, never actually having anywhere that says "Click here to download this program" or anything like that. Well that's par for the course.

In any case, I really think that I'll probably just use the method of installing Mint, customizing it how I want, and then making it read-only to reduce wear and tear, as long as that method is sound. Is it? And don't worry, I won't set chmod / or do anything crazy like that.
Post edited October 25, 2020 by HeresMyAccount
avatar
HeresMyAccount: Well, man bootcd and whereis bootcd give me nothing, so I assume that it's not installed, but I found this:
Yeah I presume you're not running Debian right now so it probably wouldn't be installed. (And even if you were, chances are you'd have to install it first)

It seems to be the only really helpful and relevant link.
What search engine are you using? Is Google giving us dramatically different results or something? Coz once again, even though this is yet another tool I've never seen before, I found lots of helpful info from the very first search result using the terms I suggested above (debian bootcd), in mere seconds. See screenshot...

I clicked the links under the Source and Binaries headings but they just send me to huge lists of other links, never actually having anywhere that says "Click here to download this program" or anything like that. Well that's par for the course.
Yep, as usual, these packages are normally installed using the system's (here Debian's) package manager.. apt-get, apt, or whatever they use today.

In any case, I really think that I'll probably just use the method of installing Mint, customizing it how I want, and then making it read-only to reduce wear and tear, as long as that method is sound. Is it?
It doesn't sound crazy at all. Give it a try and see how it works.
Attachments:
bootcd.png (278 Kb)
Post edited October 25, 2020 by clarry
I'm using Mint (version 20), but that's derived from Ubuntu which is derived from Debian, so I didn't know if that counted.

I use Duck Duck Go, never Google, because it's not private, and I'm all about privacy.

Well I could easily use apt or apt-get but I'd have to know exactly what parameters to put in, like the exact name of the thing that I want to install. Remember that BootCD was also the name of other things, so if I just typed something along the lines of "apt-get bootcd" then who knows what I'd get?

Well, I'll test the bootcd method if I can manage to get a copy of it and some instructions on how to use it, but otherwise I'm going with the other method of preinstallation. In any case, I don't think I'll be able to get around to it until some time next week, and I want to do it when I have plenty of time in case something goes wrong and I have to fix it. In any case, nobody is as anxious as I am to finally get this thing working!
As you found out on tracker.debian.org, the package is indeed called just bootcd. I have to say, both tracker.debian.org and packages.debian.org would be a lot more useful if they contained links to the manuals contained within a given package..

I can't figure out how to get duckduckgo to return useful results with just plain search terms, but it has useful bangs. !debman bootcd would've brought up the debian man page that was 1st result on google. Not that it's very useful for man pages that you don't know exist, or whose exact name you don't know.

Just because mint is derived from ubuntu is derived from debian doesn't mean all the packages from debian actually work. I'm not sure I would count on bootcd working, though the package seems to be there (if those mint pages aren't lying) and there's one way to find out if it works. *Shrug*

I'd recommend you go with whatever method you find most comfortable. And then if it doesn't work out and you feel adventurous, try something else :-)
Oh, well I wasn't certain that the name of the file or package necessarily matched the official name of the program, like for example, if someone were to abbreviate something or put a hyphen in, etc. But I'll try installing it and calling it bootcd.

I'm surprised that DDG would have such significantly different results than Google, and I'm not sure why. I don't know what putting an exclamation point before a word would do - isn't it like in programming where it means "not", so it would exclude search results that find it? But if that were the case then I don't see why you'd have used it, so I really don't know what it does.

Yeah, sadly I realize that you can't count 100% on one distributing having the same things as another one, even if one evolved from the other. I do like Linux a lot but that seems to be a significant disadvantage and potential inconvenience.

Well, I'll try it when I have the time in a few days. I guess the worst that can happen is it doesn't work and I have to reformat the USB stick and try again. Eh, big deal, right?
avatar
HeresMyAccount: I don't know what putting an exclamation point before a word would do - isn't it like in programming where it means "not", so it would exclude search results that find it? But if that were the case then I don't see why you'd have used it, so I really don't know what it does.
DuckDuckGo has search shortcuts for thousands of sites. These all start with a bang. !debman (also !dman) is the bang for manpages.debian.org searc. !we (also just !w) is for Wikipedia (English). !gog for game search on GOG. And so on. https://duckduckgo.com/bang
Post edited October 25, 2020 by clarry
Holy crap, that's interesting! Thanks.
avatar
HeresMyAccount: Yeah, sadly I realize that you can't count 100% on one distributing having the same things as another one, even if one evolved from the other. I do like Linux a lot but that seems to be a significant disadvantage and potential inconvenience.
It's also a major advantage. If anything, I lament the fact that mainstream distros are becoming more and more alike each other while distros that offer something unique seem to become more and more niche. It's becoming an uphill fight to be different, specially when we're seeing more and more developers who think in a very polarizing "our way or highway" manner. I have to say the community was much more appreciative of differences and choice back 15 years ago.
Actually that's a really good point, but it also seems to me like if a few distributions took basically all of the best parts of all the different ones, but with an easy way to customize them into something seeming more like whichever one you want, in terms of how it looks and works, and what you can do and how you do it, etc., then wouldn't that be the best thing? I mean, I guess there might be circumstances when too many things conflict and it can't all be available at once, at least not in a convenient and compatible way, but it seems like with enough forethought, if enough people were to work together to make it happen, something like that could pretty much exist, couldn't it? Then you wouldn't have to worry about, "Does this one do what I want, or should I go with that one instead? But if I go with that one then I won't be able to easily do something else that I also want to do...", and so on.