Score:0

Can I install a driver into a copy of Ubuntu from the computer flashing it?

cn flag

I would like to flash Ubuntu Mate to an SD card to be used in a Raspberry Pi. (I don't know why, but a company spokesperson told me my LCD display's driver works on Ubuntu Mate but not Ubuntu Server.)

The driver is simply required to be cloned from a GitHub repository, and a simple install script in that directory to be run, in order to be installed.

Is it possible for me to run this installation process from the computer in which I will be flashing the operating system to the SD card, so that the SD card already will have the display driver when I insert it into the Pi, and I will not need to execute the installation procedure after booting the Pi up?

Hi-Angel avatar
es flag
Yes, you can do it. Hmm, can't seem to find any duplicate to this question… Anyway, basically, once you flashed the system into its location *(SD card in your case, though it doesn't matter)*, you can `chroot` into it. By `chroot`ing you will have the environment of that installed system, so you can do various administration stuff, for example installing packages. Before `chroot` you will need to mount a few directories, for the list of commands see [this paragraph on Arch wiki](https://wiki.archlinux.org/title/Install_Arch_Linux_from_existing_Linux#Method_B:_Using_the_LiveCD_image)
Hi-Angel avatar
es flag
Although, wait, nvm. By "flashing" do you mean installing it into SD card, or just flashing the live system into SD *(i.e. as opposed to proper installation, simply flasing the ISO into SD)*? In the latter case ignore my comment, that may be harder to do, I'm not aware of the exact content such SD card will have.
ar flag
It depends on what the script does. If the script compiles the sources code to binary, then doing so on the PC won't work in the Raspberry Pi. They have different CPU architectures. You have to run the script from the running Pi.
John Smith avatar
cn flag
@Hi-Angel I do not know the difference between installation and flashing the live system. I mean writing the operating system to the SD card so that when I insert it into the Pi it boots that OS. So far I have used the Raspberry Pi application for this.
John Smith avatar
cn flag
@user68186 What about telling the operating system to execute certain commands (i.e. a script) once, on the first boot?
ar flag
I don't know about that.
user535733 avatar
cn flag
I find the statement "*my LCD display's driver works on Ubuntu Mate but not Ubuntu Server.*" to be suspect. Ubuntu Mate and Ubuntu Server use the same kernel.
ar flag
@user535733 the Ubuntu server does not have any GUI. Maybe that's what OP means.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.