penguins-eggs 10.0.19 → 10.0.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -102,191 +102,221 @@ class Distro {
102
102
  this.releaseLike = 'unstable';
103
103
  }
104
104
  /**
105
- * Analisi: codenameId
105
+ * Analize distroId
106
106
  */
107
- switch (this.codenameId) {
108
- case 'jessie': {
109
- // Debian 8 jessie
110
- this.distroLike = 'Debian';
111
- this.codenameLikeId = 'jessie';
112
- this.liveMediumPath = '/lib/live/mount/medium/';
113
- this.isCalamaresAvailable = false;
114
- break;
115
- }
116
- case 'stretch': {
117
- // Debian 9 stretch
118
- this.distroLike = 'Debian';
119
- this.codenameLikeId = 'stretch';
120
- this.liveMediumPath = '/lib/live/mount/medium/';
121
- this.isCalamaresAvailable = false;
122
- break;
123
- }
124
- case 'buster': {
125
- // Debian 10 buster
126
- this.distroLike = 'Debian';
127
- this.codenameLikeId = 'buster';
128
- break;
129
- }
130
- case 'bullseye': {
131
- // Debian 11 bullseye
132
- this.distroLike = 'Debian';
133
- this.codenameLikeId = 'bullseye';
134
- break;
135
- }
136
- case 'bookworm': {
137
- // Debian 12 bookworm
138
- this.distroLike = 'Debian';
139
- this.codenameLikeId = 'bookworm';
140
- break;
141
- }
142
- case 'trixie': {
143
- // Debian 13 trixie
144
- this.distroLike = 'Debian';
145
- this.codenameLikeId = 'trixie';
146
- break;
147
- }
148
- case 'beowulf': {
149
- // Devuab 3 beowulf
150
- this.distroLike = 'Devuan';
151
- this.codenameLikeId = 'beowulf';
152
- break;
153
- }
154
- case 'chimaera': {
155
- // Devuab 4 chimaera
156
- this.distroLike = 'Devuan';
157
- this.codenameLikeId = 'chimaera';
158
- break;
159
- }
160
- case 'daedalus': {
161
- // Devuan 5 daedalus
162
- this.distroLike = 'Devuan';
163
- this.codenameLikeId = 'daedalus';
164
- break;
165
- }
166
- /**
167
- * Ubuntu LTS + actual
168
- */
169
- case 'bionic': {
170
- // Ubuntu 18.04 bionic LTS eol aprile 2023
171
- this.distroLike = 'Ubuntu';
172
- this.codenameLikeId = 'bionic';
173
- this.liveMediumPath = '/lib/live/mount/medium/';
174
- break;
175
- }
176
- case 'focal': {
177
- // Ubuntu 20.04 focal LTS
178
- this.distroLike = 'Ubuntu';
179
- this.codenameLikeId = 'focal';
180
- break;
181
- }
182
- case 'jammy': {
183
- // Ubuntu 22.04 jammy LTS
184
- this.distroLike = 'Ubuntu';
185
- this.codenameLikeId = 'jammy';
186
- break;
187
- }
188
- case 'noble': {
189
- // Ubuntu 24.04 noble LTS
190
- this.distroLike = 'Ubuntu';
191
- this.codenameLikeId = 'noble';
192
- break;
193
- }
194
- case 'devel': {
195
- // Ubuntu rhino
196
- this.distroLike = 'Ubuntu';
197
- this.codenameLikeId = 'devel';
198
- break;
199
- }
107
+ if (this.distroId === 'Alpine') {
108
+ this.familyId = 'alpine';
109
+ this.distroLike = 'Alpine';
110
+ this.codenameId = 'rolling'; // questo viene rimosso dal nome
111
+ this.codenameLikeId = 'alpine-rolling';
112
+ this.liveMediumPath = '/.modloop/'; // ? è il mount della root su cd di installatione
113
+ this.squashfs = `live/filesystem.squashfs`;
114
+ this.syslinuxPath = '/usr/share/syslinux/'; //correct
115
+ this.pxelinuxPath = this.syslinuxPath;
116
+ this.usrLibPath = '/usr/lib/';
117
+ this.memdiskPath = this.syslinuxPath;
118
+ this.isolinuxPath = this.syslinuxPath;
119
+ // At the moment
120
+ this.isCalamaresAvailable = false;
121
+ }
122
+ else if (this.distroId === 'Fedora') {
123
+ this.familyId = 'fedora';
124
+ this.distroLike = 'Fedora';
125
+ this.codenameId = 'rolling';
126
+ this.codenameLikeId = '40';
127
+ this.liveMediumPath = '/run/install/repo/'; // ? è il mount della root su cd di installatione
128
+ this.squashfs = `live/filesystem.squashfs`;
129
+ this.syslinuxPath = '/usr/share/syslinux/';
130
+ this.pxelinuxPath = this.syslinuxPath;
131
+ this.usrLibPath = '/usr/lib/';
132
+ this.memdiskPath = this.syslinuxPath;
133
+ this.isolinuxPath = this.syslinuxPath;
134
+ // At the moment
135
+ this.isCalamaresAvailable = false;
136
+ }
137
+ else if (this.distroId === 'openSUSE') {
138
+ this.familyId = 'suse';
139
+ this.distroLike = 'openSUSE';
140
+ this.codenameId = 'rolling';
141
+ this.codenameLikeId = 'Tumbleweed';
142
+ this.liveMediumPath = '/run/install/repo/'; // ? è il mount della root su cd di installatione
143
+ this.squashfs = `live/filesystem.squashfs`;
144
+ this.syslinuxPath = '/usr/share/syslinux/';
145
+ this.pxelinuxPath = this.syslinuxPath;
146
+ this.usrLibPath = '/usr/lib/';
147
+ this.memdiskPath = this.syslinuxPath;
148
+ this.isolinuxPath = this.syslinuxPath;
149
+ // At the moment
150
+ this.isCalamaresAvailable = false;
151
+ }
152
+ else {
200
153
  /**
201
- * Arch Linux/Garuda
154
+ * Arch/Debian/Devuan/Manjaro and Ubuntu
202
155
  */
203
- case 'Spizaetus':
204
- case 'n/a':
205
- case 'rolling': {
206
- if (this.distroId === "Alpine") {
207
- // Alpine
208
- this.familyId = 'alpine';
209
- this.distroLike = 'Alpine';
210
- this.codenameId = 'rolling'; // questo viene rimosso dal nome
211
- this.codenameLikeId = 'alpine-rolling';
212
- this.liveMediumPath = '/.modloop/'; // ? è il mount della root su cd di installatione
213
- this.squashfs = `to/define/filestem.squashfs`;
156
+ switch (this.codenameId) {
157
+ case 'jessie': {
158
+ // Debian 8 jessie
159
+ this.distroLike = 'Debian';
160
+ this.codenameLikeId = 'jessie';
161
+ this.liveMediumPath = '/lib/live/mount/medium/';
162
+ this.isCalamaresAvailable = false;
163
+ break;
164
+ }
165
+ case 'stretch': {
166
+ // Debian 9 stretch
167
+ this.distroLike = 'Debian';
168
+ this.codenameLikeId = 'stretch';
169
+ this.liveMediumPath = '/lib/live/mount/medium/';
170
+ this.isCalamaresAvailable = false;
171
+ break;
172
+ }
173
+ case 'buster': {
174
+ // Debian 10 buster
175
+ this.distroLike = 'Debian';
176
+ this.codenameLikeId = 'buster';
177
+ break;
178
+ }
179
+ case 'bullseye': {
180
+ // Debian 11 bullseye
181
+ this.distroLike = 'Debian';
182
+ this.codenameLikeId = 'bullseye';
183
+ break;
184
+ }
185
+ case 'bookworm': {
186
+ // Debian 12 bookworm
187
+ this.distroLike = 'Debian';
188
+ this.codenameLikeId = 'bookworm';
189
+ break;
190
+ }
191
+ case 'trixie': {
192
+ // Debian 13 trixie
193
+ this.distroLike = 'Debian';
194
+ this.codenameLikeId = 'trixie';
195
+ break;
196
+ }
197
+ case 'beowulf': {
198
+ // Devuab 3 beowulf
199
+ this.distroLike = 'Devuan';
200
+ this.codenameLikeId = 'beowulf';
201
+ break;
202
+ }
203
+ case 'chimaera': {
204
+ // Devuab 4 chimaera
205
+ this.distroLike = 'Devuan';
206
+ this.codenameLikeId = 'chimaera';
207
+ break;
214
208
  }
215
- else {
216
- // Arch, ArcoLinux, BlendOS, EndeavourOS, Garuda, RebornOS
209
+ case 'daedalus': {
210
+ // Devuan 5 daedalus
211
+ this.distroLike = 'Devuan';
212
+ this.codenameLikeId = 'daedalus';
213
+ break;
214
+ }
215
+ /**
216
+ * Ubuntu LTS + actual
217
+ */
218
+ case 'bionic': {
219
+ // Ubuntu 18.04 bionic LTS eol aprile 2023
220
+ this.distroLike = 'Ubuntu';
221
+ this.codenameLikeId = 'bionic';
222
+ this.liveMediumPath = '/lib/live/mount/medium/';
223
+ break;
224
+ }
225
+ case 'focal': {
226
+ // Ubuntu 20.04 focal LTS
227
+ this.distroLike = 'Ubuntu';
228
+ this.codenameLikeId = 'focal';
229
+ break;
230
+ }
231
+ case 'jammy': {
232
+ // Ubuntu 22.04 jammy LTS
233
+ this.distroLike = 'Ubuntu';
234
+ this.codenameLikeId = 'jammy';
235
+ break;
236
+ }
237
+ case 'noble': {
238
+ // Ubuntu 24.04 noble LTS
239
+ this.distroLike = 'Ubuntu';
240
+ this.codenameLikeId = 'noble';
241
+ break;
242
+ }
243
+ case 'devel': {
244
+ // Ubuntu rhino
245
+ this.distroLike = 'Ubuntu';
246
+ this.codenameLikeId = 'devel';
247
+ break;
248
+ }
249
+ /**
250
+ * Arch Linux/Garuda
251
+ */
252
+ case 'Spizaetus':
253
+ case 'n/a':
254
+ case 'rolling': {
217
255
  this.familyId = 'archlinux';
218
256
  this.distroLike = 'Arch';
219
257
  this.codenameId = 'rolling';
220
258
  this.codenameLikeId = 'rolling';
221
259
  this.liveMediumPath = '/run/archiso/bootmnt/';
222
260
  this.squashfs = `arch/x86_64/airootfs.sfs`;
261
+ break;
223
262
  }
224
- break;
225
- }
226
- default: {
227
- /**
228
- * patch per Roy VERIFICARE
229
- */
230
- let found = false;
231
- let file = path.resolve(__dirname, '../../conf/derivatives.yaml');
232
- if (fs.existsSync('/etc/penguins-eggs.d/derivatives.yaml')) {
233
- file = '/etc/penguins-eggs.d/derivatives.yaml';
234
- }
235
- const content = fs.readFileSync(file, 'utf8');
236
- const distros = yaml.load(content);
237
- for (const distro of distros) {
238
- if (distro.ids !== undefined) {
239
- for (let n = 0; n < distro.ids.length; n++) {
240
- if (this.codenameId === distro.ids[n]) {
241
- found = true;
242
- this.distroLike = distro.distroLike;
243
- this.codenameLikeId = distro.id;
244
- this.familyId = distro.family;
263
+ default: {
264
+ /**
265
+ * patch per Roy VERIFICARE
266
+ */
267
+ let found = false;
268
+ let file = path.resolve(__dirname, '../../conf/derivatives.yaml');
269
+ if (fs.existsSync('/etc/penguins-eggs.d/derivatives.yaml')) {
270
+ file = '/etc/penguins-eggs.d/derivatives.yaml';
271
+ }
272
+ const content = fs.readFileSync(file, 'utf8');
273
+ const distros = yaml.load(content);
274
+ for (const distro of distros) {
275
+ if (distro.ids !== undefined) {
276
+ for (let n = 0; n < distro.ids.length; n++) {
277
+ if (this.codenameId === distro.ids[n]) {
278
+ found = true;
279
+ this.distroLike = distro.distroLike;
280
+ this.codenameLikeId = distro.id;
281
+ this.familyId = distro.family;
282
+ }
245
283
  }
246
284
  }
247
285
  }
248
- }
249
- if (!found) {
250
- console.log(`This distro ${this.distroId}/${this.codenameId} is not yet recognized!`);
251
- console.log('');
252
- console.log('You can edit /usr/lib/penguins-eggs/conf/derivatives.yaml to add it -');
253
- console.log('after that - run: sudo eggs dad -d to re-configure eggs.');
254
- console.log('If you can create your new iso, you can contribute to the project');
255
- console.log('by suggesting your modification.');
256
- process.exit(0);
286
+ if (!found) {
287
+ console.log(`This distro ${this.distroId}/${this.codenameId} is not yet recognized!`);
288
+ console.log('');
289
+ console.log('You can edit /usr/lib/penguins-eggs/conf/derivatives.yaml to add it -');
290
+ console.log('after that - run: sudo eggs dad -d to re-configure eggs.');
291
+ console.log('If you can create your new iso, you can contribute to the project');
292
+ console.log('by suggesting your modification.');
293
+ process.exit(0);
294
+ }
257
295
  }
258
296
  }
297
+ /**
298
+ * setting paths: syslinux, isolinux, usrLibPath
299
+ */
300
+ switch (this.familyId) {
301
+ case 'debian': {
302
+ this.isolinuxPath = '/usr/lib/ISOLINUX/';
303
+ this.syslinuxPath = '/usr/lib/syslinux/modules/bios/';
304
+ this.pxelinuxPath = '/usr/lib/PXELINUX/';
305
+ this.memdiskPath = '/usr/lib/syslinux/';
306
+ this.usrLibPath = '/usr/lib/' + Utils.usrLibPath();
307
+ break;
308
+ }
309
+ case 'archlinux': {
310
+ this.syslinuxPath = '/usr/lib/syslinux/bios/';
311
+ this.pxelinuxPath = this.syslinuxPath;
312
+ this.usrLibPath = '/usr/lib/';
313
+ this.memdiskPath = this.syslinuxPath;
314
+ this.isolinuxPath = this.syslinuxPath;
315
+ break;
316
+ }
317
+ // No default
318
+ } // Fine analisi codenameId
259
319
  }
260
- /**
261
- * setting paths: syslinux, isolinux, usrLibPath
262
- */
263
- switch (this.familyId) {
264
- case 'debian': {
265
- this.isolinuxPath = '/usr/lib/ISOLINUX/';
266
- this.syslinuxPath = '/usr/lib/syslinux/modules/bios/';
267
- this.pxelinuxPath = '/usr/lib/PXELINUX/';
268
- this.memdiskPath = '/usr/lib/syslinux/';
269
- this.usrLibPath = '/usr/lib/' + Utils.usrLibPath();
270
- break;
271
- }
272
- case 'archlinux': {
273
- this.syslinuxPath = '/usr/lib/syslinux/bios/';
274
- this.pxelinuxPath = this.syslinuxPath;
275
- this.usrLibPath = '/usr/lib/';
276
- this.memdiskPath = this.syslinuxPath;
277
- this.isolinuxPath = this.syslinuxPath;
278
- break;
279
- }
280
- case 'alpine': {
281
- this.syslinuxPath = '/usr/share/syslinux/'; //correct
282
- this.pxelinuxPath = this.syslinuxPath;
283
- this.usrLibPath = '/usr/lib/';
284
- this.memdiskPath = this.syslinuxPath;
285
- this.isolinuxPath = this.syslinuxPath;
286
- break;
287
- }
288
- // No default
289
- } // Fine analisi codenameId
290
320
  /**
291
321
  * if lsb-release exists
292
322
  */
@@ -24,7 +24,7 @@ export default class Fedora {
24
24
  await exec(`dnf install ${this.packs4calamares.join(' ')}`, echo);
25
25
  }
26
26
  catch {
27
- Utils.error(`Fedora.calamaresInstall() pacman -Sy ${this.packs4calamares.join(' ')}`); // + e.error)
27
+ Utils.error(`fedora.calamaresInstall()`);
28
28
  }
29
29
  }
30
30
  /**
@@ -42,8 +42,7 @@ export default class Fedora {
42
42
  if (fs.existsSync('/etc/calamares')) {
43
43
  await exec('rm /etc/calamares -rf', echo);
44
44
  }
45
- // yay???
46
- await exec('yay -Rns calamares', echo);
45
+ await exec('dnf remove calamares', echo);
47
46
  return retVal;
48
47
  }
49
48
  /**
@@ -91,7 +90,6 @@ export default class Fedora {
91
90
  */
92
91
  static packageIsInstalled(packageName) {
93
92
  let installed = false;
94
- // rpm -qa | grep -i nano
95
93
  const cmd = `/usr/bin/dnf list --installed ${packageName}`;
96
94
  const stdout = shx.exec(cmd, { silent: true }).stdout.trim();
97
95
  if (stdout.includes(packageName)) {
@@ -9,7 +9,7 @@
9
9
  * Utils: general porpourse utils
10
10
  * @remarks all the utilities
11
11
  */
12
- export default class Suse {
12
+ export default class Opensuse {
13
13
  static packs4calamares: string[];
14
14
  /**
15
15
  *
@@ -13,7 +13,7 @@ import Utils from '../utils.js';
13
13
  * Utils: general porpourse utils
14
14
  * @remarks all the utilities
15
15
  */
16
- export default class Suse {
16
+ export default class Opensuse {
17
17
  static packs4calamares = ['calamares'];
18
18
  /**
19
19
  *
@@ -24,7 +24,7 @@ export default class Suse {
24
24
  await exec(`zypper install ${this.packs4calamares.join(' ')}`, echo);
25
25
  }
26
26
  catch {
27
- Utils.error(`Fedora.calamaresInstall() pacman -Sy ${this.packs4calamares.join(' ')}`); // + e.error)
27
+ Utils.error(`Opensuse.calamaresInstall()`);
28
28
  }
29
29
  }
30
30
  /**
@@ -33,9 +33,8 @@ export default class Suse {
33
33
  static async calamaresPolicies() {
34
34
  const policyFile = '/usr/share/polkit-1/actions/com.github.calamares.calamares.policy';
35
35
  /**
36
- * Su fedora occorre vedere come fare!
36
+ * Su openSuse occorre vedere come fare!
37
37
  */
38
- // await exec(`sed -i 's/auth_admin/yes/' ${policyFile}`)
39
38
  }
40
39
  /**
41
40
  *
@@ -83,18 +83,26 @@ export default class Ovary {
83
83
  */
84
84
  finished(scriptOnly?: boolean): void;
85
85
  /**
86
- * initrdArch()
87
- * necessita di echoYes
86
+ * initrdAlpine()
88
87
  */
89
- initrdArch(): Promise<void>;
88
+ initrdAlpine(): Promise<void>;
89
+ /**
90
+ * initrdFedora()
91
+ */
92
+ initrdFedora(): Promise<void>;
93
+ /**
94
+ * initrdSuse()
95
+ */
96
+ initrdSuse(): Promise<void>;
90
97
  /**
91
98
  * initrdArch()
92
99
  * necessita di echoYes
93
100
  */
94
- initrdAlpine(): Promise<void>;
101
+ initrdArch(): Promise<void>;
95
102
  /**
103
+ * initrdDebian()
104
+ * Actually based on live* packages
96
105
  * We must upgrade to initrdCreate for Debian/Ubuntu
97
- * @returns
98
106
  */
99
107
  initrdDebian(verbose?: boolean): Promise<void>;
100
108
  /**
@@ -703,15 +703,43 @@ export default class Ovary {
703
703
  console.log(`Note: format UDF, generated by ${chalk.cyanBright('genisoimage')}`);
704
704
  }
705
705
  }
706
+ /**
707
+ * initrdAlpine()
708
+ */
709
+ async initrdAlpine() {
710
+ Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Alpine on ISO/live`);
711
+ let initrdImg = 'initramfs-lts';
712
+ // dracut
713
+ // const pathConf = path.resolve(__dirname, `../../dracut/dracut.conf.d`)
714
+ // await exec(`dracut --confdir ${pathConf} ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true))
715
+ // mkinitfs
716
+ const pathConf = path.resolve(__dirname, `../../mkinitfs/live.conf`);
717
+ await exec(`mkinitfs -c ${pathConf} -o ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
718
+ const sidecar = path.resolve(__dirname, `../../mkinitfs/sidecar.sh`);
719
+ await exec(`cp ${sidecar} ${this.settings.iso_work}live/`);
720
+ }
721
+ /**
722
+ * initrdFedora()
723
+ */
724
+ async initrdFedora() {
725
+ Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Fedora on ISO/live`);
726
+ await exec(`cp /boot/initramfs-*.img ${this.settings.iso_work}/live/`, this.echo);
727
+ }
728
+ /**
729
+ * initrdSuse()
730
+ */
731
+ async initrdSuse() {
732
+ Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Fedora on ISO/live`);
733
+ await exec(`cp /boot/initrd-* ${this.settings.iso_work}/live/`, this.echo);
734
+ }
706
735
  /**
707
736
  * initrdArch()
708
737
  * necessita di echoYes
709
738
  */
710
739
  async initrdArch() {
711
- Utils.warning(`creating ${path.basename(this.settings.initrdImg)} on ISO/live`);
712
740
  let initrdImg = Utils.initrdImg();
713
741
  initrdImg = initrdImg.slice(Math.max(0, initrdImg.lastIndexOf('/') + 1));
714
- Utils.warning(`Creating ${initrdImg} in ${this.settings.iso_work}live/`);
742
+ Utils.warning(`creating ${path.basename(this.settings.initrdImg)} ArchLinux on ISO/live`);
715
743
  const { distroId } = this.settings.distro;
716
744
  let fileConf = 'arch';
717
745
  if (isMiso(distroId)) {
@@ -724,26 +752,12 @@ export default class Ovary {
724
752
  await exec(`mkinitcpio -c ${pathConf} -g ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
725
753
  }
726
754
  /**
727
- * initrdArch()
728
- * necessita di echoYes
729
- */
730
- async initrdAlpine() {
731
- Utils.warning(`creating ${path.basename(this.settings.initrdImg)} on ISO/live`);
732
- let initrdImg = Utils.initrdImg();
733
- //initrdImg = initrdImg.slice(Math.max(0, initrdImg.lastIndexOf('/') + 1))
734
- Utils.warning(`Creating ${initrdImg} in ${this.settings.iso_work}live/`);
735
- const { distroId } = this.settings.distro;
736
- // da cambiare ...
737
- let fileConf = 'arch';
738
- const pathConf = path.resolve(__dirname, `../../mkinitcpio/${fileConf}/live.conf`);
739
- await exec(`mkinitcpio -c ${pathConf} -g ${this.settings.iso_work}live/${initrdImg}`, Utils.setEcho(true));
740
- }
741
- /**
755
+ * initrdDebian()
756
+ * Actually based on live* packages
742
757
  * We must upgrade to initrdCreate for Debian/Ubuntu
743
- * @returns
744
758
  */
745
759
  async initrdDebian(verbose = false) {
746
- Utils.warning(`creating ${path.basename(this.settings.initrdImg)} on ISO/live`);
760
+ Utils.warning(`creating ${path.basename(this.settings.initrdImg)} Debian/Devuan/Ubuntu on ISO/live`);
747
761
  let isCrypted = false;
748
762
  if (fs.existsSync('/etc/crypttab')) {
749
763
  isCrypted = true;
@@ -1446,15 +1460,24 @@ export default class Ovary {
1446
1460
  await this.isolinux(this.theme);
1447
1461
  await this.kernelCopy();
1448
1462
  /**
1449
- * we need different behaviour on
1450
- * initrd for different familis
1463
+ * we need different initfs
1464
+ * for different families
1451
1465
  */
1452
- if (this.familyId === 'debian') {
1453
- await this.initrdDebian();
1454
- }
1455
- else if (this.familyId === 'archlinux') {
1466
+ if (this.familyId === 'archlinux') {
1456
1467
  await this.initrdArch();
1457
1468
  }
1469
+ else if (this.familyId === 'alpine') {
1470
+ await this.initrdAlpine();
1471
+ }
1472
+ else if (this.familyId === 'fedora') {
1473
+ await this.initrdFedora();
1474
+ }
1475
+ else if (this.familyId === 'suse') {
1476
+ await this.initrdSuse();
1477
+ }
1478
+ else if (this.familyId === 'debian') {
1479
+ await this.initrdDebian();
1480
+ }
1458
1481
  if (this.settings.config.make_efi) {
1459
1482
  await this.makeEfi(this.theme);
1460
1483
  }
@@ -11,10 +11,10 @@
11
11
  */
12
12
  export default class Utils {
13
13
  /**
14
- * Custom function to sort object keys
15
- * @param obj
16
- * @returns
17
- */
14
+ * Custom function to sort object keys
15
+ * @param obj
16
+ * @returns
17
+ */
18
18
  static sortObjectKeys(obj: {
19
19
  [key: string]: any;
20
20
  }): {
@@ -29,11 +29,10 @@ const __dirname = path.dirname(new URL(import.meta.url).pathname);
29
29
  */
30
30
  export default class Utils {
31
31
  /**
32
- * Custom function to sort object keys
33
- * @param obj
34
- * @returns
35
- */
36
- //
32
+ * Custom function to sort object keys
33
+ * @param obj
34
+ * @returns
35
+ */
37
36
  static sortObjectKeys(obj) {
38
37
  const sorted = {};
39
38
  Object.keys(obj)
@@ -110,14 +109,19 @@ export default class Utils {
110
109
  static vmlinuz() {
111
110
  let distro = new Distro();
112
111
  let vmlinuz = '';
113
- // patch per raspberry arm64
114
112
  // find vmlinuz in /proc/cmdline
115
113
  const cmdline = fs.readFileSync('/proc/cmdline', 'utf8').split(" ");
116
114
  cmdline.forEach(cmd => {
117
115
  if (cmd.includes('BOOT_IMAGE')) {
118
116
  vmlinuz = cmd.substring(cmd.indexOf('=') + 1);
119
- if (!fs.existsSync(vmlinuz) && fs.existsSync(`/boot${vmlinuz}`)) {
120
- vmlinuz = `/boot${vmlinuz}`;
117
+ // patch per fedora BOOT_IMAGE=(hd0,gpt2)/vmlinuz-6.9.9-200.fc40.x86_64
118
+ if (vmlinuz.includes(")")) {
119
+ vmlinuz = cmd.substring(cmd.indexOf(')') + 1);
120
+ }
121
+ if (!fs.existsSync(vmlinuz)) {
122
+ if (fs.existsSync(`/boot/${vmlinuz}`)) {
123
+ vmlinuz = `/boot/${vmlinuz}`;
124
+ }
121
125
  }
122
126
  }
123
127
  });
Binary file