[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: How to apt-get from preseed/late_command?



Josef Wolf wrote:
> I'd like to "apt-get update; apt-get upgrade" from preseed/late_command
> causing the first reboot to come up with updated kernel/modules.  So I
> put this (splitted and commented for readability) into my seed file:
> 
>   d-i preseed/late_command string \
>     cp /cdrom/preseed/postinstall.sh /target; \
>     ln -s /postinstall.sh /target/etc/rcS.d/S98postinstall; \
>     chroot /target apt-get --yes --force-yes -q update; \
>     chroot /target apt-get --yes --force-yes -q upgrade; \
>     echo press ENTER; read a
> 
> But for some reason, apt-get just hangs.  How can I find out the reason
> why it hangs?  Any ideas?
 
Have you checked the syslog?

The 'read a' will certianly hang, since stdin in not connected to
something a user can press enter at.

You might have more luck using the in-target command to run your apt-get
in /target in an environment better tuned for package installation.

> BTW: Is there any reason that automatic update/upgrade at the end of the
>      install is not done in the official distribution?

Because an upgrade process is generally much less constrained than an
initial install in terms of what can possibly go wrong. There can be
config file modification prompts (due to bugs in packages mostly), and
lots of other potential for stuff that wouldn't happen during an
install.

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature


Reply to: