You are not logged in.

#1 2020-07-26 17:04:51

boolves
Member
Registered: 2019-06-20
Posts: 7

Can't build live ISO with custom repo

Hello,

I am trying to build a live iso to mount VMFS filesystem on a free server I was given to recover data.

I've created my custom repository as seen here:

/home/user/repo
.
├── customrepo.db -> customrepo.db.tar.gz
├── customrepo.db.tar.gz
├── customrepo.files -> customrepo.files.tar.gz
└── customrepo.files.tar.gz

My pacman.conf has this repo added

[repo]
SigLevel = Optional TrustAll
Server = file:///home/user/repo/$arch

However, when I go to build the iso, I get the following error

error: failed retrieving file 'customrepo.db' from disk : Couldn't open file /~/repo/repo/x86_64/customrepo.db

I've tried moving the files into directory path exactly as the error, no luck.

Also, all files are owned by root.

Would appreciate any help on this.

Offline

#2 2020-07-26 17:51:22

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: Can't build live ISO with custom repo

You don't need to use the $arch bit, it adds unwanted sub-paths that you don't really care about...
Now if I'm right, it's attempting to grab the repo from INSIDE the chroot, so you need to make a bind mount inside the chroot in order to make it work properly...
And use a better path, but I may be wrong on that...

EDIT: i'm wrong, and the wiki states it more clearly than me...

Can you run mkarchiso with the -v flag and add the output to your initial post inside code tags?

Last edited by GaKu999 (2020-07-26 18:05:08)


My reposSome snippets

Heisenberg might have been here.

Offline

#3 2020-07-26 18:20:26

boolves
Member
Registered: 2019-06-20
Posts: 7

Re: Can't build live ISO with custom repo

Im actually prebaking the ISO, not booted into it.

I did remove the $arch path, however still getting the same issues, unfortunately.


Here's the build log:

[root@blackrabbit releng]# ./build.sh -v

[mkarchiso] INFO: Configuration settings
[mkarchiso] INFO:                   Command:   init
[mkarchiso] INFO:              Architecture:   x86_64
[mkarchiso] INFO:         Working directory:   work/x86_64
[mkarchiso] INFO:    Installation directory:   arch
[mkarchiso] INFO:        Pacman config file:   work/pacman.conf

[mkarchiso] INFO: Installing packages to 'work/x86_64/airootfs/'...
==> Creating install root at work/x86_64/airootfs
==> Installing packages to work/x86_64/airootfs
:: Synchronizing package databases...
error: failed retrieving file 'customrepo.db' from disk : Couldn't open file /~/repo/repo/x86_64/customrepo.db
error: failed to update customrepo (download library error)
 core is up to date
 extra is up to date
 community                      5.1 MiB  3.33 MiB/s 00:02 [###############################] 100%
error: failed to synchronize all databases
==> ERROR: Failed to install packages to new root

Last edited by boolves (2020-07-26 18:23:09)

Offline

#4 2020-07-26 19:42:28

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: Can't build live ISO with custom repo

Can't replicate your issue...
The chroot wrong assumption was based on lack of knowledge about pacstrap...

Why the output looks like that?

/~/repo/repo/x86_64/customrepo.db

Are you changing it or the ~ is not being expanded and treated as a literal ~?

Let's run some testings:
Clean the work and out directories, so it gets properly rebuilt.
Change the pacman.conf repo location to /var/tmp/repo (that tmp is not volatile).
Move your custom repository there.
And try to run the build.sh again.

Last edited by GaKu999 (2020-07-26 19:45:51)


My reposSome snippets

Heisenberg might have been here.

Offline

#5 2020-07-27 02:12:24

boolves
Member
Registered: 2019-06-20
Posts: 7

Re: Can't build live ISO with custom repo

GaKu999 wrote:

Can't replicate your issue...
The chroot wrong assumption was based on lack of knowledge about pacstrap...

Why the output looks like that?

/~/repo/repo/x86_64/customrepo.db

Are you changing it or the ~ is not being expanded and treated as a literal ~?

Let's run some testings:
Clean the work and out directories, so it gets properly rebuilt.
Change the pacman.conf repo location to /var/tmp/repo (that tmp is not volatile).
Move your custom repository there.
And try to run the build.sh again.

I am not sure why it's being treated that way since I am mapping the full path inside pacman.conf. I will try to map all my steps here and maybe you  can tell me if I am missing anything


1. Install archiso package

 sudo pacman -S archiso 

2. Copy profile to ~/user/archlive

 cp -r /usr/share/archiso/configs/releng/ archive 

3. Install vmfs-tools package and create custom repo for vmfs-tools

 

yay -S vmfs-tools

repo-add /var/tmp/customrepo/customrepo.db.tar.gz /home/user/.cache/yay/vmfs-tools/vmfs-tools.pkg.tar.xz

4. add custom repo to archlive/pacman.conf

[customrepo]
SigLevel = Optional TrustAll
Server = file:///var/tmp/customrepo/customrepo.db.tar.gz/$arch

5. Build the live USB

./build.sh -v

Then I receive the error code that is mentioned.

Offline

#6 2020-07-27 02:20:14

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: Can't build live ISO with custom repo

file:///var/tmp/customrepo/customrepo.db.tar.gz/$arch

What?
You can leave it as ‘file:///var/tmp/customrepo’...
In fact if it’s failing now it surely is because of that...

Also remember that ~ already expands to your home, ‘~/user/archlive’ would be ‘/home/user/user/archlive’ but let’s ignore that...

Edit: typo // instead of ///...

Last edited by GaKu999 (2020-07-27 04:20:30)


My reposSome snippets

Heisenberg might have been here.

Offline

#7 2020-07-27 03:59:25

boolves
Member
Registered: 2019-06-20
Posts: 7

Re: Can't build live ISO with custom repo

I've edited the repo to this, it still is giving me the same error unfortunately.

[customrepo]
SigLevel = Optional TrustAll
Server = file://var/tmp/customrepo

Offline

#8 2020-07-27 14:00:19

ondoho
Member
Registered: 2013-04-30
Posts: 692
Website

Re: Can't build live ISO with custom repo

All I can say is that 'file:///home/etc...' is correct. There has to be 3 slashes for absolute paths.

Offline

#9 2020-07-28 00:13:07

boolves
Member
Registered: 2019-06-20
Posts: 7

Re: Can't build live ISO with custom repo

Thanks,

I've made the path with 3 forward slashes but unfortunately still running into my errors.

Offline

Board footer

Powered by FluxBB