Author Topic: Some questions about remastering  (Read 389 times)

Online blerton

  • Full Member
  • ****
  • Posts: 219
Some questions about remastering
« on: January 13, 2020, 11:26:48 PM »
I have a machine installed from the Nov 2019 Darkstar ISO with some extras added.  It is fully updated.  More importantly, I've configured the DE for my normal user to be just the way I like it to be.  I wish to be able to remaster this exact setup and then reinstall it on a number of other machines.  The intention is to end up with the same user and the already configured environment on the additional machines.  There are some hardware differences but since hardware detection during the install sorts all that out, I expect these differences will get detected and handled during the subsequent install.

As a trial, I've made a 'first attempt' remaster and I do get pretty much what I'm after.  I left the user name as it was.  I had wondered if I should change it to 'guest'.  The result was that on first boot of the additional machine, it asked for the user name and politely told me to choose something else as the name I wanted was "already in use". ;D  So I gave it a junk name which, after the install, I removed.  So, no big deal, since I was then able to login with the preferred user name and the configuration I had set up seems to be all there, just as it was before I remastered it.

So the first question is, should I have changed the user name to 'guest' before remastering, or is there some better way of achieving what I want?

The additional machines (just like the one remastered) have a specific type of AMD GPU.  It belongs to the 1st generation of what AMD calls Graphics Core Next (GCN) and referred to as "Southern Islands" series (SI).  These machines do scientific number crunching using the OpenCL capabilities of the GPU.  Until very recently, these machines have been using the old proprietary Catalyst driver (fglrx) and the included OpenCL libs.  When AMD deprecated fglrx and switched to using the amdgpu kernel module, there wasn't a corresponding OpenCL capability available that allowed SI GPUs to work.  Consequently, these machines have stayed with KDE4 and were last updated just before the new Xorg version that heralded the end of fglrx - around Sept 2016.

I have been monitoring the development of the amdgpu driver and OpenCL libs ever since.  AMD regularly produce software for Linux (originally called AMDGPU-PRO) which includes OpenCL libs.  I started exploring the 16.60 version of that in early 2017.  Progressively, the later versions of GCN have had working OpenCL, but 1st gen cards have continued not to cooperate - until now.  Last December, I played around with components from the 19.30 Red Hat package when it was released.  I don't know which particular bit was the final thing to get fixed, but the combination of the 5.4.6 kernel/amdgpu module with OpenCL libs from the 19.30 AMDGPU-PRO package gives me fully working OpenCL on SI GPUs.  I have tested several so far.  So now my task is to upgrade a bunch of machines from mid-2016 KDE4 to latest KDE5.  I'm actually looking forward to this with a great sense of relief!! ;D

So now to the question.  For SI GPUs to work with OpenCL, two extra kernel options need to be added to the first line in /etc/default/grub and grub.cfg needs to be rebuilt.  These options are  radeon.si_support=0  and  amdgpu.si_support=1.   I had been using these during the testing phase of the machine I remastered.  When I tested the remaster on an additional machine, those options didn't carry across.  I assume that's because it's probably best in the general case not to carry across customisations that might not be appropriate for the target machine.  In other words, some default config gets used to eliminate customisations.  My question is, should I just plan for adding the options every time I use the remaster and then run update-grub2, or is it OK to modify whatever file holds the default so I don't have to do it each time?  The sole purpose of the remaster is to upgrade SI machines, so I'll always need those options.

I guess a 3rd general question for the remaster gurus is, do you have any particular tips or tricks to suggest that would be beneficial for what I'm trying to do?  I have more than 30 machines to do so I'm quite keen to spend time up front in learning how best to do things so as to save effort (and potential mistakes) in the actual process itself. ::) :o ;D
Logged
"It ain't what you don't know that gets you into trouble.  It's what you know for sure that just ain't so."  -  Mark Twain.

Online tbschommer

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6301
  • In Tex we trust
Re: Some questions about remastering
« Reply #1 on: January 14, 2020, 01:54:08 AM »
The first question is easily answered: just click on "Done" (or is it "Cancel"?) to leave the user creation screen. Your original user will be there and will work. This threw me off as well when I started using remasters.

For the Grub options you'll have to wait for Tex or one of his experts to give a proper answer.

Logged
Please donate or become a patron on Patreon



In memory of Joble, Tara-Rain-9.5ß, Sproggy

Online blerton

  • Full Member
  • ****
  • Posts: 219
Re: Some questions about remastering
« Reply #2 on: January 14, 2020, 04:54:27 AM »
... just click on "Done" (or is it "Cancel"?) to leave the user creation screen. Your original user will be there and will work.
Thanks for that.  I appreciate the reply.

When I entered my user name, I had in my mind that it should just accept it.  When it got rejected, I wasn't smart enough to leave the field blank. ::)
All I could think of was entering something that wouldn't be rejected.

Once again, thanks for the information.
Logged
"It ain't what you don't know that gets you into trouble.  It's what you know for sure that just ain't so."  -  Mark Twain.

Online tbschommer

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6301
  • In Tex we trust
Re: Some questions about remastering
« Reply #3 on: January 14, 2020, 05:12:00 AM »
... just click on "Done" (or is it "Cancel"?) to leave the user creation screen. Your original user will be there and will work.
Thanks for that.  I appreciate the reply.

When I entered my user name, I had in my mind that it should just accept it.  When it got rejected, I wasn't smart enough to leave the field blank. ::)
All I could think of was entering something that wouldn't be rejected.

Once again, thanks for the information.

I remember well how confused I was when I first encountered this. After a couple of tries I finally realized that the user was already configured, so why not just bail out and see what happens.

I hope you get your GPU questions answered so you can continue updating all those machines you have  :)

Logged
Please donate or become a patron on Patreon



In memory of Joble, Tara-Rain-9.5ß, Sproggy

Offline Legs11

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 31956
  • Veni Vidi Vici MLU
Re: Some questions about remastering
« Reply #4 on: January 14, 2020, 06:23:18 AM »
When I first hit this 'existing user name' situation I chose Guest as a new user, and then after booting into my user account removed Guest again.

Leaving it blank seemed counter-intuitive at first, but works out fine.  :D
Logged
"Posterity - a paultry form of eternity"  L. Cohen

Kernel: 5.4.12-pclos1;  Desktop: KDE Plasma 5.17.5 ;  TK: QT 5.12.6; Mobo: ASUSTeK P8Z68-V PRO v: Rev 1.0.1;   CPU: Quad core i7-3770S;   Mem: 8 GB;   Graphics: Intel Xeon E3-1200 v2/3rd;   Display:  LG 2560x1080 60Hz

Offline present_arms

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 6272
  • TrinityDE Big Daddy and Openbox Remasterer
    • Trinity PCLinuxOS Remaster
Re: Some questions about remastering
« Reply #5 on: January 14, 2020, 09:37:34 AM »
yes as others have said, just set root password and skip the username bit, :) I found that when doing a personal remaster :D

Offline kjpetrie

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 9502
  • Cogito ergo qui est?
    • K J Petrie
Re: Some questions about remastering
« Reply #6 on: January 14, 2020, 12:19:38 PM »
You could try adding the kernel parameters to the end of the strings on lines 1279, 1443, 1447, 1455, and 1459 of /usr/sbin/mylivecd before remastering and see whether that carries through to the installation. If that doesn't work you might have to add them manually each time using the procedure below.

As I recall, when the installer gets to bootloader creation you should get the option to add any custom boot parameters at that point. If you put a single-line file containing those on your desktop before remastering you should be able to open it and copy and paste the contents straight into the form field at that point. If the clipboard gets included in the remaster (and I've never tested that) you might just need to ensure those options are on the clipboard before remastering, ready to paste.
Logged
KJP
-----------------------------------------------------------
PClos64 2013 (KDE5) on AMD FX 8350 on GA-970A-DS3P (Rev 2.0), 24GB RAM, Asus EN210 (Nvidia) GPU, Maxtor STM325031, 3 SSDs, Amilo LSL 3220T monitor. Also Acer 5810TG.

https://www.kjpetrie.co.uk/

Online blerton

  • Full Member
  • ****
  • Posts: 219
Re: Some questions about remastering
« Reply #7 on: January 14, 2020, 07:13:34 PM »
Thanks to all for the replies.  I didn't feel quite so dumb after the Legs11 "counter-intuitive" description. ;D

I took kjp's advice and had a look through the mylivecd script.  I've never used perl before - basic bash stuff is my limit. ::)

However, it's so well written and commented that it's actually quite a pleasure to read and investigate.
As soon as I got to the 'help' section and found

Code: [Select]
--bootopt  <option>         Specify an additional boot option to pass ....
I thought that perhaps all I need to do is not modify the script at all but rather just make sure that

Code: [Select]
--bootopt "radeon.si_support=0 amdgpu.si_support=1"
is added to the full set of options with which mylivecd is invoked?

Further comments appreciated!  ;D
Logged
"It ain't what you don't know that gets you into trouble.  It's what you know for sure that just ain't so."  -  Mark Twain.

Offline Tex

  • Administrator
  • Super Villain
  • **********
  • Posts: 22021
  • Space City, Tx
Re: Some questions about remastering
« Reply #8 on: January 15, 2020, 01:11:13 AM »
It only passes those options when booting in bios mode after creating an iso with the --bootopt . It does not pass those options when booting in uefi mode. I guess some adjustments need to be made to mylivecd.

Logged

Online blerton

  • Full Member
  • ****
  • Posts: 219
Re: Some questions about remastering
« Reply #9 on: January 15, 2020, 07:02:53 AM »
It only passes those options when booting in bios mode after creating an iso with the --bootopt . It does not pass those options when booting in uefi mode. I guess some adjustments need to be made to mylivecd.

Thanks very much for that information.  Please don't feel obliged to spend time on this.  I'm sure you have more than enough on your plate already.

I've been investigating what happens at various points and have some observations to report.

The machine I'm remastering has an ASUS P5KPL AM/PS motherboard and a q8400 CPU.  No UEFI options in its BIOS.  It boots in BIOS mode.  I even checked the ASUS website to confirm no UEFI options for that particular board.  I built the machine in 2008 and it's been doing number crunching ever since.

The machine has an MSI HD7850 GPU.  As described earlier, it was running a KDE4 system but it now has a fresh new install and is configured with OpenCL libs for GPU crunching.  I've run the science app for about a week, producing hundreds of validated results with no problems at all.  I've also tested different brands/models of GPU - eg Gigabyte R7 370 on other similar vintage machines.  There have been no problems so I'm ready to upgrade a bunch more machines with SI GPUs.

I used MyLiveGTK to select all the options that get passed to myliveusb.  I made a second remaster and, as a test, included --bootopt "radeon.si_support=0 amdgpu.si_support=1" in the box on the MyLiveGTK screen that was (I think) called 'Advanced options' or something like that.  I previewed the mylivecd command line and exactly what I'd added showed up in the complete command string.  So I let it run and a new ISO was produced with no adverse comment about the extra options.  I used myliveUSB to add this 2nd remaster to the same USB stick that had my first attempt.

To test the 2nd remaster, I chose another machine with an SI GPU.  I saved a complete copy of its science software tree (apps and lots of data files) on an external USB drive and then replaced the internal disk in that machine with a separate disk, keeping the original as a backup.  I booted the remaster and used 'e' to look at the list of kernel options.  The two extra ones weren't there so I added them and proceeded with the boot. I wiped the newly added spare disk, created a basic set of partitions and ran fsck -ccvy to do a full bad block scan (just to be sure) before installing the remaster.  At the end of installation, when about to set up the bootloader, I again added the two options to the end of the string of options showing on screen before clicking 'next' to do the bootloader install.  Everything finished normally.

I rebooted into the new install and used 'e' to see if the options were there.  Once again they were missing, so I added them before continuing.  When asked for a user name, I left the box blank and hit OK but it insisted on having a name.  So, I just hit 'cancel' as others had said and all was well.  As soon as it finished booting, I edited the default grub file and ran update-grub2.  I'm sure this one will stick. ;D

On checking the install, everything seems to be perfect.  clinfo reports all the right sort of details about the OpenCL capabilities of the GPU so I put back the complete science tree I'd saved and updated the science apps to the latest available versions and it's now running jobs without any sign of anything being amiss.  I'm extremely happy with what I have now since just adding the boot options manually like I did at the end is quite trivial and the important stuff like having a very quick way to transfer the complete science tree and having all the look and feel stuff done and tools like kwrite, konsole, dolphin, etc all preconfigured to my liking will save a huge amount of time compared to installing a standard ISO and then doing all the configuration manually.

I'm a very happy camper so please don't feel you need to devote any time to changing what currently exists.  I'm very grateful for what I now have.
Logged
"It ain't what you don't know that gets you into trouble.  It's what you know for sure that just ain't so."  -  Mark Twain.

Offline Tex

  • Administrator
  • Super Villain
  • **********
  • Posts: 22021
  • Space City, Tx
Re: Some questions about remastering
« Reply #10 on: January 15, 2020, 07:10:04 AM »
FYI: I used mylivecd --bootopt "radeon.si_support=0 amdgpu.si_support=1" xxx.iso in a root terminal to make my ISO.

Logged

Offline Legs11

  • PCLinuxOS Tester
  • Super Villain
  • *******
  • Posts: 31956
  • Veni Vidi Vici MLU
Re: Some questions about remastering
« Reply #11 on: January 15, 2020, 07:16:25 AM »
FYI: I used mylivecd --bootopt "radeon.si_support=0 amdgpu.si_support=1" xxx.iso in a root terminal to make my ISO.

That applies to running the ISO .......  but when installing, which is what I think blerton wanted to achieve, those options would not be used, but the default options would be used.

Is it possible to alter the default options before remastering, as well as adding the ISO boot options, to ensure they would also be used on install?

Logged
"Posterity - a paultry form of eternity"  L. Cohen

Kernel: 5.4.12-pclos1;  Desktop: KDE Plasma 5.17.5 ;  TK: QT 5.12.6; Mobo: ASUSTeK P8Z68-V PRO v: Rev 1.0.1;   CPU: Quad core i7-3770S;   Mem: 8 GB;   Graphics: Intel Xeon E3-1200 v2/3rd;   Display:  LG 2560x1080 60Hz

Offline Tex

  • Administrator
  • Super Villain
  • **********
  • Posts: 22021
  • Space City, Tx
Re: Some questions about remastering
« Reply #12 on: January 15, 2020, 07:26:16 AM »
Maybe change /etc/default/grub then remaster and test an install in virtualbox to see if it carries over.
Logged