Package Search
 
Members: 353 | Topics: 767 | Posts: 3211
We welcome our newest member: ClintBarton
Info
» You aren't logged in, login or registerOnline: No members and 6 guests | Time: 13:42
understanding paldo-live and make-iso specs
paldo Support Forum    paldo    General Discussion
Reply Reply   Subscribe Topic Subscribe Topic
11 posts found.Page: 1 2
 understanding paldo-live and make-iso specs
Moderator
 
 
Linux-Dude
 
Posts: 1187
Registered: 2006-11-23
paldo-live
Code[In neuem Fenster öffnen]
 <cmd>cd $CHROOTDIR</cmd> 
- <!-- create livecd user paldo and let it autologin
-->
<cmd>cp -a $CHROOTDIR/etc/skel $CHROOTDIR/home/paldo</cmd>
<cmd>chown -R 1000:1000 $CHROOTDIR/home/paldo</cmd>
<cmd>echo "paldo:x:1000:1000::/home/paldo:/bin/bash" >> $CHROOTDIR/etc/passwd</cmd>
<cmd>echo "paldo:x:1000:" >> $CHROOTDIR/etc/group</cmd>
<cmd>sed -i -e 's/^wheel:.*/wheel:x:18:paldo/' $CHROOTDIR/etc/group</cmd>
<cmd>sed -i -e 's/^audio:.*/audio:x:6:paldo/' $CHROOTDIR/etc/group</cmd>
<cmd>sed -i -e 's/^video:.*/video:x:22:paldo/' $CHROOTDIR/etc/group</cmd>
<cmd>sed -i -e 's/^cdrom:.*/cdrom:x:25:paldo/' $CHROOTDIR/etc/group</cmd>
<cmd>sed -i -e 's/^disk:.*/disk:x:17:paldo/' $CHROOTDIR/etc/group</cmd>
- <!-- add to disk group to allow gparted to run
-->
<cmd>sed -i -e 's/^network:.*/network:x:23:paldo/' $CHROOTDIR/etc/group</cmd>
<cmd>echo "paldo:paldo" | chroot $CHROOTDIR chpasswd --md5</cmd>


You add a live-cd user which can run gparted and has soud
rights without asking for passwords. Gparted won't
start everytime. I don't know why ... For what is skel for?

Code[In neuem Fenster öffnen]
  <text dest="$CHROOTDIR/etc/gdm/custom.conf">[daemon] AutomaticLoginEnable=true AutomaticLogin=paldo</text> 
<cmd>cp $CHROOTDIR/usr/share/xsessions/gnome.desktop $CHROOTDIR/usr/share/gdm/BuiltInSessions/default.desktop</cmd>
- <!-- fix gconf defaults permissions
-->
<cmd>chmod -R a+r $CHROOTDIR/etc/gconf/gconf.xml.defaults</cmd>
<cmd>find $CHROOTDIR/etc/gconf/gconf.xml.defaults -type d | xargs chmod a+x</cmd>


You add custom.conf to autologin paldo. I can remove it later.
the gconf.xml.defaults permissions are needed to display
normal user proper. When I copy the files 1:1 I must
keep them.

Code[In neuem Fenster öffnen]
<!--  deactivate unneeded daemons 
-->
<cmd>sed -i -e 's/: 2 3 4 5/:/' -e 's/: 0 1 6/: 0 1 2 3 4 5 6/' $CHROOTDIR/etc/init.d/hplip</cmd>
- <!-- disable nscd, doesn't seem to work with unionfs
-->
<cmd>rm -vf $CHROOTDIR/etc/init.d/nscd $CHROOTDIR/etc/network/if-up.d/nscd</cmd>
- <!-- add some more possible mountpoints as /media is read-only
-->
<cmd>mkdir -p /media/{cdrecorder,usbdisk}</cmd>


this is to get space. I can undo it with backups.

Code[In neuem Fenster öffnen]
<!--  remove build-dependencies we don't really have space for on cd 
-->
<cmd>chroot $CHROOTDIR upkg-remove --force noweb</cmd>
<cmd>chroot $CHROOTDIR upkg-remove --force tetex</cmd>
<cmd>rm -rf $CHROOTDIR/usr/lib/ooo-2.0/help</cmd>
<cmd>rm -rf $CHROOTDIR/usr/share/gimp/2.0/help</cmd>
- <!-- remove unsupported locales
-->
<cmd>find $CHROOTDIR/usr/share/locale/ -maxdepth 1 -type d | xargs -n 1 basename | ( while read locale ; do case "$locale" in en*|de*|fr*|it*|es*|pt*) ;; *) rm -rvf $CHROOTDIR/usr/share/$locale ;; esac ; done )</cmd>
- <!-- update mime and desktop database
-->
<cmd>chroot $CHROOTDIR update-mime-database /usr/share/mime</cmd>
<cmd>chroot $CHROOTDIR update-desktop-database /usr/share/applications</cmd>


the strip of unsupported locals I can skip also the update
of the databases when I don't change programs.

Code[In neuem Fenster öffnen]
<!--  create fonts.dir files for modular xorg 
-->
<cmd>[ ! -x $CHROOTDIR/usr/bin/mkfontdir ] || chroot $CHROOTDIR bash -c "mkfontdir /usr/share/X11/fonts/*"</cmd>
- <!-- strip binaries
-->
<cmd>find $CHROOTDIR{,/usr}{/bin,/lib,/sbin} -name '*.a' -o -name '*.o' -o -name '*.ko' -type f -exec /usr/bin/strip --strip-debug '{}' \;</cmd>
<cmd>find $CHROOTDIR{,/usr}{/bin,/lib,/sbin} -not -name '*.a' -not -name '*.o' -not -name '*.ko' -not -name '*.exe' -not -name '*.dll' -type f -exec /usr/bin/strip --strip-unneeded '{}' \;</cmd>


The fonts-dir is ok as you told me before. The filestripping
is only to get space. It dosn't affect the running of the
system.
Profile   Private Message   E-Mail
Created: 2007-03-26 09:21 | Modified: 2007-03-26 10:39 by juerg
Highlight selected Text   Edit   Delete   Quote Reply
 Re: understanding your specs ?!?
Moderator
 
 
Linux-Dude
 
Posts: 1187
Registered: 2006-11-23
make-iso

Code[In neuem Fenster öffnen]
<cmd>cd $CHROOTDIR</cmd> 
- <!-- temp. workaround to fix mono 1.1.10+ (relocatable) with unionfs
-->
<cmd>mkdir -p usr/etc</cmd>
<cmd>[ ! -e etc/mono ] || cp -a etc/mono usr/etc</cmd>
- <!-- savedefault breaks el-torito grub
-->
<cmd>sed -i -e '/savedefault/d' boot/grub/menu.lst</cmd>
<cmd check="no">umount -l .{/dev,/proc,/sys,$CACHEDIR}</cmd>
<cmd>rm -rf tmp/*</cmd>


Mono-fix is ok. I can keep it also.

Also I understand the menu.lst changings.

Code[In neuem Fenster öffnen]
<cmd>sed -i -e 's%.* / .*%/dev/loop0 / squashfs ro,defaults 0 0%' etc/fstab</cmd> 
<cmd>mkdir -p media/ram</cmd>
<cmd>sed -i -e 's%root=[^"]*%root=cdrom rootfstype=iso9660 vga=0x317%' boot/grub/menu.lst etc/default/grub</cmd>


the rootfs.img gets mounted on loop0. This ok but I can't
mount any other squashfs-images during livecd-mode. Why?

Code[In neuem Fenster öffnen]
  <cmd>sed -i -e 's/cachedir/& chroot="yes"/' etc/upkg.conf</cmd> 
<cmd>mkdir -p rootfs</cmd>
<cmd>mv bin dev etc home lib media mnt opt proc root sbin srv sys tmp usr var rootfs</cmd>
<cmd>mkdir -p rootfs/{boot,upkg}</cmd>
<cmd>touch rootfs/.readonly</cmd>
<cmd>ln -sf /upkg/stage{1,2} rootfs</cmd>
<cmd>mksquashfs rootfs rootfs.img</cmd>
<cmd>rm -rf rootfs</cmd>
<cmd>cd /</cmd>
- <!-- hardcoded /var/cache/upkg as this is in paldo and we know that this path is correct in paldo
-->
- <!-- iso-level 4 (aka iso9660 v2) enables booting from e.g. GIGABYTE GA-8I945P-G
-->
<cmd>mkisofs -b boot/grub/stage2_eltorito -c boot.catalog -no-emul-boot -boot-load-size 4 -boot-info-table -V paldo -o /var/cache/upkg/paldo.iso -R -iso-level 4 $CHROOTDIR</cmd>


The creating of rootfs.img and the iso I understand.


Profile   Private Message   E-Mail
Created: 2007-03-26 09:26
Highlight selected Text   Edit   Delete   Quote Reply
 Re: understanding your specs ?!?
Moderator
 
 
Linux-Dude
 
Posts: 1187
Registered: 2006-11-23
The problems I have:

gparted don't start always with user paldo.
When I click on Computer I can't access the filesystem
(I've to start nautilus via terminal: nautilus /)
When I want to add a launcher to the desktop it never
shows up. Only in the root-account.
I can't mount other squashfs-images. Migth be cos of looop0.

What is the best way to get a livecd running and get
the files I coping to the hdd the same as when I
bootstrapped them to the hdd?

thx for the help. With the gparted-livecd I can
copy the bootstrapped-squashfs easy to the hdd and
it works without a problem. Gparted-livecd dosn't have
chown and chpasswd so I've to add them to it or
make a own Install-LiveCd with the needed files on it.

Best would be if the Paldo-LiveCd can run my installer
the same way I run it with the GParted-LiveCD.

All files you can find here:

http://www.paldo.org/~amnon
Profile   Private Message   E-Mail
Created: 2007-03-26 09:33
Highlight selected Text   Edit   Delete   Quote Reply
 Re: understanding paldo-live and make-iso specs
Administrator
 
 
 
Posts: 426
Registered: 2004-09-09
Zitat
Original erstellt: 2007-03-26 09:21 von Amnon82
paldo-live
You add a live-cd user which can run gparted and has soud
rights without asking for passwords. Gparted won't
start everytime. I don't know why ... For what is skel for?

The gparted build is incompatible with the libparted in testing, I've committed a rebuild. /etc/skel is the skeleton (i.e. the default) for home directories.

Zitat
the gconf.xml.defaults permissions are needed to display
normal user proper. When I copy the files 1:1 I must
keep them.

The permission change is just a workaround needed when building the cd, you can ignore this change (i.e. copy the file to disk as is).

The rest of paldo-live should be ok.
Profile   Private Message   Web
Created: 2007-03-26 10:51
Highlight selected Text   Edit   Delete   Quote Reply
 Re: understanding your specs ?!?
Administrator
 
 
 
Posts: 426
Registered: 2004-09-09
Zitat
Original erstellt: 2007-03-26 09:26 von Amnon82
make-iso

the rootfs.img gets mounted on loop0. This ok but I can't
mount any other squashfs-images during livecd-mode. Why?

I don't know, I haven't tested that. Do you really have to mount the squashfs-images, isn't unsquashfs better suitable for installation purposes?
Profile   Private Message   Web
Created: 2007-03-26 10:55
Highlight selected Text   Edit   Delete   Quote Reply
 Re: understanding paldo-live and make-iso specs
Moderator
 
 
Linux-Dude
 
Posts: 1187
Registered: 2006-11-23
Well then I try unsquashfs. But why is the Desktop-Link on
the nautilus desktop broken. I'll download a normal
livecd tonight to check that if it is a problem in
general or one of mine.

The Gparted-livecd-way:

I boot up gparted-livecd and start the installer.
It mounts the squashed image of a normal bootstrap of
paldo-desktop without graphics, office and multimedia
(these packages should be a cos of breaking the Desktop-
icon on the gnome-desktop). Installing grub and co via
the scripts. It worked and the desktop-icon isn't broken.

The Paldo-Livecd-way:

Booting livecd up and autologin paldo-livecduser.
Starting the installer and gparted. coping the rootfs.img
to the mounted target hdd. Removing custom.conf and
installing grub and co the same way as in the gparted-
livecd-version. Desktop-icon seems to be broken also
during the livecd-mode. What can it be?

Branch:

I used stable as branch. In what branch is gparted working
with the livecd-user? In stable it mostly don't worked with
the livecd-user but with root always. When I click on
Gparted Icon I get an error-message that I've to have
root-rights to run this program even if the live-cduser
has root-privilegs.

ISO:

When I copied the rootfs.img to the hdd and startup
paldo I can't mount a cd. I always get the error that
the system don't support iso9960 (hope I'm right with
the number). What can it be?

Desktop-Icon:

I get something like filesystem.desktop, paldo.desktop
DVD%R/W%Burner.desktop instead of the normal icons.
What can that be?
Profile   Private Message   E-Mail
Created: 2007-03-26 12:51 | Modified: 2007-03-26 13:30 by Amnon82
Highlight selected Text   Edit   Delete   Quote Reply
 the try of today
Moderator
 
 
Linux-Dude
 
Posts: 1187
Registered: 2006-11-23
Now I'm using these files:

http://www.paldo.org/~amnon/20070326

I let you know what happend.
Profile   Private Message   E-Mail
Created: 2007-03-26 22:07
Highlight selected Text   Edit   Delete   Quote Reply
 sed script
Moderator
 
 
Linux-Dude
 
Posts: 1187
Registered: 2006-11-23
I'm bootstrapping now the actual testing-branch. In the installer I use this for the grub-setup:

Code[In neuem Fenster öffnen]
#!/bin/bash
# Installation of Grub, expects <%TargetPart%> as $1 and <%SwapPart%> as $2
disk=`echo "$1" | cut -c1-3`
grub-install --root-directory=/root/mnt/$1 /dev/$disk
# remove old menu.lst
rm -f /root/mnt/$1/boot/grub/menu.lst
# making new menu.lst
touch /root/mnt/$1/boot/grub/menu.lst
echo " " > /root/mnt/$1/boot/grub/menu.lst
echo "timeout 5" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey y z" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey z y" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey Y Z" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey Z Y" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey equal parenright" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey parenright parenleft" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey parenleft asterisk " >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey doublequote at" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey plus bracketright" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey minus slash" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey slash ampersand" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey ampersand percent" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey percent caret" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey underscore question" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey question underscore" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey semicolon less" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey less numbersign" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey numbersign backslash" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey colon greater" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey greater bar" >> /root/mnt/$1/boot/grub/menu.lst
echo "setkey asterisk braceright" >> /root/mnt/$1/boot/grub/menu.lst
echo "default saved" >> /root/mnt/$1/boot/grub/menu.lst
echo "default 0" >> /root/mnt/$1/boot/grub/menu.lst

# Adding Paldo entries
echo "title paldo stable (linux 2.6.20.3-paldo1)" >> /root/mnt/$1/boot/grub/menu.lst
echo "kernel /boot/linux-2.6.20.3-paldo1 root=/dev/$1 resume=/dev/$2 vga=0x317" >> /root/mnt/$1/boot/grub/menu.lst
echo "initrd /boot/initramfs-2.6.20.3-paldo1" >> /root/mnt/$1/boot/grub/menu.lst
echo "savedefault" >> /root/mnt/$1/boot/grub/menu.lst
echo " " >> /root/mnt/$1/boot/grub/menu.lst


What will be the sed-cmds to get stable and 2.6.20.3-paldo1 out of title paldo stable (linux X.X.XX.X-paldoX) ?
Profile   Private Message   E-Mail
Created: 2007-03-26 22:39 | Modified: 2007-03-26 22:44 by Amnon82
Highlight selected Text   Edit   Delete   Quote Reply
 Re: understanding paldo-live and make-iso specs
Moderator
 
 
Linux-Dude
 
Posts: 1187
Registered: 2006-11-23
I made some mistakes:

Code[In neuem Fenster öffnen]
<cmd>cp etc/group backup/etc/passwd</cmd>
<cmd>cp etc/group backup/etc/group</cmd>


Should be:

Code[In neuem Fenster öffnen]
<cmd>cp etc/passwd backup/etc/passwd</cmd>
<cmd>cp etc/group backup/etc/group</cmd>


Also paldoinstaller is wrong.

should be:

Code[In neuem Fenster öffnen]
/paldo/installer/paldoinstaller


and not:

Code[In neuem Fenster öffnen]
./paldoinstaller


I'll fix that.

btw. now the installer works with testing branch.
Profile   Private Message   E-Mail
Created: 2007-03-27 10:10
Highlight selected Text   Edit   Delete   Quote Reply
 Re: understanding paldo-live and make-iso specs
Moderator
 
 
Linux-Dude
 
Posts: 1187
Registered: 2006-11-23
Good news. All works now!

I used the testing-branch. The size of the CD is now 617.
I'll see what programs I add to reach around 700 MB.

Only for the grub-setup I'll need some help.
As I asked before: Is there a way to get the info
for the kernel version? I'll try to night something.
The branch I can read out from the upkg.conf.

Must be easy with sed-cmds. Only if you read it, maybe
you can post me these commands.
Profile   Private Message   E-Mail
Created: 2007-03-27 17:27
Highlight selected Text   Edit   Delete   Quote Reply
This topic contains further posts. Next
Page: 1 2
Subscribe Topic Subscribe Topic
powered by bitron board 1.23a