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

Re: apt-get install in hooks



Greetings,


On Mon, Jan 6, 2014 at 6:11 AM, Kamil Czekirda <kczekirda@gmail.com> wrote:
2014/1/6 Richard Nelson <unixabg@gmail.com>:
> Greetings,
>
>
> On Sun, Jan 5, 2014 at 3:28 PM, Kamil Czekirda <kczekirda@gmail.com> wrote:
>>
>> Thank you for response, but I choosed another way to have configured
>> system:
>>
>> I want to use clean image from official mirrors and configure it.
>>
>> I can configure ldap by hooks, but the main problem is installing
>> packages from hooks.
>
>
> I do not use hooks in that manner, but I think it would then be worth your
> time to examine live-medium-install :
>
> http://live-systems.org/gitweb/?p=live-tools.git;a=blob;f=bin/live-medium-install;h=d5a4230042665ee0e569dff5c36003d0140ee9a0;hb=8429ebd7a67d9f5e0b2e817f092fb7af120a25ee
>
> This is what I am using for "firmware" installs and the really nice part is
> thanks to live-boot3x you can stack in partial_squashfs images with
> filesystem.squashfs to get where you want.
>
> I just got started setting up documentation and some other helper things
> (means under construction) at http://install.live-systems.org/
>

Thank you for link to usefull script, I've added type of debian and
nonfree selection:


--- /media/debian/live-medium-install-orig 2014-01-06 12:56:55.000000000 +0100
+++ /media/debian/live-medium-install 2014-01-06 12:57:05.000000000 +0100
@@ -16,7 +16,11 @@

 _URL="http://live.debian.net/files/stable/images/${_VERSION}/amd64/webboot/"

-_FILES="debian-live-${_VERSION}-amd64-gnome-desktop.vmlinuz
debian-live-${_VERSION}-amd64-gnome-desktop.initrd.img
debian-live-${_VERSION}-amd64-gnome-desktop.squashfs"
+_TYPE="gnome-desktop"
+
+_FILES="debian-live-${_VERSION}-amd64-${_TYPE}.vmlinuz
debian-live-${_VERSION}-amd64-${_TYPE}.initrd.img
debian-live-${_VERSION}-amd64-${_TYPE}.squashfs"
+
+_NONFREE="no"

 _TARGET="/dev/sda"

@@ -81,7 +85,48 @@
 WARNING: This will erase all data on the target device
 ######################################################

-Please enter URL to download the ${_IMAGE_FILE} image from
+Please enter the type of debian to download
+(default: ${_TYPE})
+
+gnome-desktop
+kde-desktop
+lxde-desktop
+xfce-desktop
+standard
+rescue
+EOF
+
+# Ask for type
+echo -n ": "
+read _READ
+
+_TYPE=${_READ:-${_TYPE}}
+
+
+cat << EOF
+Do you want to install nonfree version? Type 'yes' or press ENTER.
+(default: ${_NONFREE})
+EOF
+
+# Ask for nonfree
+echo -n ": "
+read _READ
+
+case "${_READ}" in
+ 'yes')
+ echo "nonfree selected"
+ _NONFREE="+nonfree"
+ _URL="http://live.debian.net/files/stable/images/${_VERSION}${_NONFREE}/amd64/webboot/"
+ _FILES="debian-live-${_VERSION}-amd64-${_TYPE}${_NONFREE}.vmlinuz
debian-live-${_VERSION}-amd64-${_TYPE}${_NONFREE}.initrd.img
debian-live-${_VERSION}-amd64-${_TYPE}${_NONFREE}.squashfs"
+ ;;
+ *)
+ _FILES="debian-live-${_VERSION}-amd64-${_TYPE}.vmlinuz
debian-live-${_VERSION}-amd64-${_TYPE}.initrd.img
debian-live-${_VERSION}-amd64-${_TYPE}.squashfs"
+ ;;
+esac
+
+cat << EOF
+
+Please enter URL to download the ${_FILES} image from
 (default: ${_URL})
 EOF


Thanks for the patches. I reworked the ideas here a bit and made two commits at:

 http://live.debian.net/gitweb/?p=live-tools.git;a=shortlog;h=refs/heads/debian-next 

 

 

>>
>> Of course I can build images myself, it's not problem, but is the last
>> way.
>>
>
> I agree, I would rather reuse official images and the stacking of
> partial_squashfs is one way to do that.
>

Thank you, I'm going to write script which makes personalized images.


Perhaps this:

 http://install.live-systems.org/scripts/partial-squashfs-updates

will be of assistance to you. It is what I am using to make partials and then to stack them together after so many partials.

Again thanks for the patches and if the partial-squashfs-updates script is useful let me and the mail-list know.

Thanks.
 
> Hope this information assists.
>
>
>>
>>
>> 2014/1/5 Richard Nelson <unixabg@gmail.com>:
>> > Greetings,
>> >
>> >
>> > On Sun, Jan 5, 2014 at 2:20 PM, Kamil Czekirda <kczekirda@gmail.com>
>> > wrote:
>> >>
>> >> Hello,
>> >>
>> >> I'm using hooks in my debian-live in wheezy.
>> >>
>> >> I've tried to install software in very simple script:
>> >>
>> >> #!/bin/sh
>> >> echo "HOOK: install htop"
>> >>
>> >> apt-get update
>> >> apt-get install htop
>> >>
>> >> But Processing triggers for man-db complitly crashes system. I must
>> >> hardly restart machine.
>> >>
>> >> I can make apt-get update in hooks and manualy install package after
>> >> login, but I want to change list of packages automaticly.
>> >>
>> >> For me it's a good way to configure debian without repacking squashfs
>> >> and making personal configuration, isn't it?
>> >>
>> >
>> > If you are building your own images see the manual (assuming you are
>> > using
>> > stable live-build 3x):
>> >
>> > http://live-systems.org/manual/stable/html/live-manual.en.html#430
>> >
>> > If you are not able to build your own, you can use the cgi builder
>> > http://cgi.build.live-systems.org/cgi-bin/live-build  and add the
>> > packages
>> > you want on the cgipackages.list.chroot: area (note the cgi builder only
>> > uses the main archive area).
>> >
>> > Hope this information assists.
>> >
>> >
>> >>
>> >> Thanks for help.
>> >>
>> >> Kamil Czekirda
>> >>
>> >>
>> >> --
>> >> To UNSUBSCRIBE, email to debian-live-request@lists.debian.org
>> >> with a subject of "unsubscribe". Trouble? Contact
>> >> listmaster@lists.debian.org
>> >> Archive:
>> >>
>> >> CADSgWNE53jt6vawpzsZYE6c=Uu+w9UH9MA7hRoDEfTwXnBFwMQ@mail.gmail.com" target="_blank">http://lists.debian.org/CADSgWNE53jt6vawpzsZYE6c=Uu+w9UH9MA7hRoDEfTwXnBFwMQ@mail.gmail.com
>> >>
>> >
>
>


Reply to: