casper preseed url not working

Bug #1849684 reported by ubuntushop
26
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Casper
New
Undecided
Unassigned
casper (Ubuntu)
Fix Released
Undecided
Unassigned
Eoan
Confirmed
Undecided
Unassigned
Focal
Fix Released
Undecided
Unassigned

Bug Description

When booting ubuntu iso from grub, the parameter url= is downloading (needs ip=dhcp) the preseed file via http but Casper thinks that with the url= parameter that it is netboot.
Same error with preseed/url= parameter.
This used to work ok in ubuntu 18.04 and 19.04

Revision history for this message
ubuntushop (g-info-l) wrote :

I think they dropped url preseed:
https://launchpad.net/ubuntu/+source/casper/1.422
or is there a new http preseed parameter?

affects: ubuntu-manpage-repository → casper
Revision history for this message
ubuntushop (g-info-l) wrote :

will the http url preseed file parameter coming back?

Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: [Bug 1849684] Re: casper preseed url not working

Yes, will fix.

On Sat, 9 Nov 2019, 04:35 ubuntushop, <email address hidden> wrote:

> will the http url preseed file parameter coming back?
>
> --
> You received this bug notification because you are subscribed to the bug
> report.
> https://bugs.launchpad.net/bugs/1849684
>
> Title:
> casper preseed url not working
>
> To manage notifications about this bug go to:
> https://bugs.launchpad.net/casper/+bug/1849684/+subscriptions
>

Revision history for this message
Dimitri John Ledkov (xnox) wrote : Re: [Bug 1849684] [NEW] casper preseed url not working

As a workaround please use the full parameter name for d-i preseed. I.e.

preseed/url=http://host/path/to/preseed.cfg

Revision history for this message
ubuntushop (g-info-l) wrote :

this also not fetch the preseed file:
preseed/url=http://host/path/to/preseed.cfg
or does this need extra parameters?

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

So there were multiple bugs:

- preseed/url= not accepted as valid pressed key
- url= accepted twice, once as netboot iso and once as d-i/ubiquity preseed config
- in server iso, it meant we downloaded .iso twice
- in desktop iso, it meant preseeding was broken

Everything should be now fixed with v1.434 upload in focal, see diff below:

http://launchpadlibrarian.net/454293849/casper_1.432_1.434.diff.gz

Can you please try daily focal to double check preseeding works for you http://cdimage.ubuntu.com/daily-live/current/ ?

I will try to SRU casper, but not sure if we will be making 19.10 point release to roll out fixed media. If we don't, and this is urgent for you, you can unpack initrd and patch scripts/casper as in the diff above.

Changed in casper (Ubuntu Focal):
status: New → Fix Released
Revision history for this message
ubuntushop (g-info-l) wrote :

in focal url=http://host/path/to/preseed.cfg is working
but preseed/url=http://host/path/to/preseed.cfg is not working.
Ok, for me.
Are you dropping the preseed/url parameter?

Revision history for this message
ubuntushop (g-info-l) wrote :

error on the preseed/url=

Wget: not a http or ftp url

Revision history for this message
Time Leow (time3864) wrote :

I can see the issue is due to bug in:
main/scripts/casper-bottom/24preseed, line 72
preseed/url=*|url=*)
  url_location="${x#url=}"
  start_network
  chroot /root wget -P /tmp "$url_location"
  locations="/tmp/$(basename "$url_location") $locations"
  ;;

if you specific
preseed/url=http://host/path/to/preseed.cfg
the variable url_location will not be transformed correctly, it will just as "preseed/url=http://host/path/to/preseed.cfg"

however, for
url=http://host/path/to/preseed.cfg
then url_location see correctly to
"http://host/path/to/preseed.cfg"

Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in casper (Ubuntu Eoan):
status: New → Confirmed
Revision history for this message
Steven Clarkson (sclarkson) wrote :

I can also confirm that preseed/url= still does not work correctly.

The line

url_location="${x#url=}"

should be changed to

url_location="${x#*url=}"

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.