[PATCHES] live-initramfs: fix for root directory permissions and grep line possbly returning more than one line

2009-06-19 Thread Luigi Capriotti

Hello,

pls find attached a couple of diffs, fixing relaxed permissions of /
in the live filesystem and possible invalid results from
function where_is_mounted.

Best regards

Luigi Capriotti


diff --git a/scripts/live b/scripts/live
index 683afa2..a966070 100755
--- a/scripts/live
+++ b/scripts/live
@@ -1286,6 +1312,9 @@ setup_unionfs ()
${rootmnt} failed with option 
noatime,dirs=/cow=rw:${rofsstring}"
fi

+   # Correct the permissions of /:
+   chmod 755 "${rootmnt}"
+
# tmpfs file systems
touch /etc/fstab
mkdir -p "${rootmnt}/live"diff --git a/scripts/live-helpers b/scripts/live-helpers
index 79b158c..1d808bd 100644
--- a/scripts/live-helpers
+++ b/scripts/live-helpers
@@ -104,7 +104,7 @@ where_is_mounted ()
if grep -q "^${device} " /proc/mounts
then
# return the first found
-   grep "^${device} " /proc/mounts | cut -f2 -d ' '
+   grep -m 1 "^${device} " /proc/mounts | cut -f2 -d ' '
fi
 }




Re: [PATCHES] live-initramfs: fix for root directory permissions and grep line possbly returning more than one line

2009-06-19 Thread Daniel Baumann
Luigi Capriotti wrote:
> fixing relaxed permissions of /
> in the live filesystem and

why is that needed?

> possible invalid results from
> function where_is_mounted.

how's that possible? i though devices to mountpoints are bijective (in
the initramfs stage).

-- 
Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:  daniel.baum...@panthera-systems.net
Internet:   http://people.panthera-systems.net/~daniel-baumann/


-- 
To UNSUBSCRIBE, email to debian-live-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: [PATCHES] live-initramfs: fix for root directory permissions and grep line possbly returning more than one line

2009-06-19 Thread Luigi Capriotti

Daniel Baumann wrote:

Luigi Capriotti wrote:

fixing relaxed permissions of /
in the live filesystem and


why is that needed?
because without chmoddin $rootmnt, / on the live system is writable for 
regular users.



possible invalid results from
function where_is_mounted.


how's that possible? i though devices to mountpoints are bijective (in
the initramfs stage).
I had two results from the grep in my tests, hence the script was 
failing with such an unexpected result.


Luigi


--
To UNSUBSCRIBE, email to debian-live-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: [PATCHES] live-initramfs: fix for root directory permissions and grep line possbly returning more than one line

2009-06-19 Thread Daniel Baumann
Luigi Capriotti wrote:
> Daniel Baumann wrote:
>> Luigi Capriotti wrote:
>>> fixing relaxed permissions of /
>>> in the live filesystem and
>>
>> why is that needed?
> because without chmoddin $rootmnt, / on the live system is writable for
> regular users.

applied.

>>> possible invalid results from
>>> function where_is_mounted.
>>
>> how's that possible? i though devices to mountpoints are bijective (in
>> the initramfs stage).
> I had two results from the grep in my tests, hence the script was
> failing with such an unexpected result.

care to explain your test? i'm still wondering for the case where it's
possible. in the meanwhile, i've applied it.

-- 
Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:  daniel.baum...@panthera-systems.net
Internet:   http://people.panthera-systems.net/~daniel-baumann/


-- 
To UNSUBSCRIBE, email to debian-live-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Shutdown automatically

2009-06-19 Thread Mohd-Khairulhazim.GHAZALI

Hello,


  Thank you for the tip. I add the word quickreboot in my  
syslinux/menu.cfg file and it works.



Regards,

Hazim


This message was sent using IMP, the Internet Messaging Program.


--
To UNSUBSCRIBE, email to debian-live-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



how to use source

2009-06-19 Thread Umarzuki Mochlis
i can see there are sources of debian live but how i can use it to create my
own live cd?

-- 
Regards,

Umarzuki Mochlis
http://gameornot.net


Re: how to use source

2009-06-19 Thread Daniel Baumann
Umarzuki Mochlis wrote:
> i can see there are sources of debian live but how i can use it to
> create my own live cd?

sources of images distributed by debian consists of a tarball that
contains two tarballs within, one with the debian source packages for
the debian binary packages that were included in the live image, and a
second that holds the configuration tree for live-helper, that was used
to put together the image.

if you just want to build an image yourself, you don't need the sources.
have a look at the manual and the wiki (there are different howtos there).

if you want to rebuild an image distributed by debian, you only need the
second tarball. unpack it somewhere, and you'll get the config tree that
you can build with live-helper. note that, depending of your local
mirror setting, if any, a few parameters would need to be adapted before
you actually can build it.

-- 
Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:  daniel.baum...@panthera-systems.net
Internet:   http://people.panthera-systems.net/~daniel-baumann/


-- 
To UNSUBSCRIBE, email to debian-live-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: how to use source

2009-06-19 Thread Umarzuki Mochlis
thanks for the info

2009/6/19 Daniel Baumann 

> Umarzuki Mochlis wrote:
> > i can see there are sources of debian live but how i can use it to
> > create my own live cd?
>
> sources of images distributed by debian consists of a tarball that
> contains two tarballs within, one with the debian source packages for
> the debian binary packages that were included in the live image, and a
> second that holds the configuration tree for live-helper, that was used
> to put together the image.
>
> if you just want to build an image yourself, you don't need the sources.
> have a look at the manual and the wiki (there are different howtos there).
>
> if you want to rebuild an image distributed by debian, you only need the
> second tarball. unpack it somewhere, and you'll get the config tree that
> you can build with live-helper. note that, depending of your local
> mirror setting, if any, a few parameters would need to be adapted before
> you actually can build it.
>
> --
> Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
> Email:  daniel.baum...@panthera-systems.net
> Internet:   
> http://people.panthera-systems.net/~daniel-baumann/
>
>
> --
> To UNSUBSCRIBE, email to debian-live-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmas...@lists.debian.org
>
>


-- 
Regards,

Umarzuki Mochlis
http://gameornot.net


Root password problem

2009-06-19 Thread Adam Mooz
Hey list,

First post! :)

So I'm building a faily-specialized live-cd which requires that I am able to
get root access when the disk is booted.  I've done just about everything I
can think of to get this going, following the suggestions on the wiki, I
cannot change the root password or the password for the user I set.  I've
used hook scripts to manually modify the root password in the shadow file to
trying to sed-ing "root:x:" to become "root::" in /etc/passwd to set the
root password to be blank, no luck!

So I tried a clean build, no options.  I ran:
lh_config && lh_build and booted from that ISO, the rood password has been
set to something.

How can I set the root password to be blank, or better yet a pre-defined
password?  The disk I'm building needs to be relatively secure so a root
password would be ideal.  Allowing sudo su access might not be the best idea
for the implementation so in the final disk I'd like to avoid using sudo.

If I remember my debian-live disks properly the root password is
autoscrambled on boot, which is, I think, why my attempts are being
thwarted.

Thanks,
Adam.


Re: Root password problem

2009-06-19 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, Jun 19, 2009 at 11:12:51AM -0400, Adam Mooz wrote:
> Hey list,
> 
> First post! :)
[...]
> root password to be blank, no luck!

Do you really need a root password? Note that the standard live user has
sudo capabilities.

Regards

- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFKO7PABcgs9XrR2kYRAv1PAJwLIBQLbNRhrLM94t4F6aXjxj016gCfXBaM
cPYCCB7s6srfGuxr+i0KpXA=
=pjoD
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-live-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: Root password problem

2009-06-19 Thread Daniel Baumann
Adam Mooz wrote:
> How can I set the root password to be blank

cat > config/chroot_local-hooks/empty-root-password.sh << EOF
#!/bin/sh

passwd -d
EOF

> or better yet a pre-defined password?

cat > config/chroot_local-hooks/predefined-root-password.sh << EOF
#!/bin/sh

echo "root:predefined_password" | chpasswd
EOF

> The disk I'm building needs to be relatively secure so a root
> password would be ideal.

i personally consider it to be more secure to have no password set for
root, ymmv.

> Allowing sudo su access might not be the best
> idea for the implementation so in the final disk I'd like to avoid using
> sudo. 

lh_config --bootappend-live nosudo

-- 
Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:  daniel.baum...@panthera-systems.net
Internet:   http://people.panthera-systems.net/~daniel-baumann/


-- 
To UNSUBSCRIBE, email to debian-live-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: Root password problem

2009-06-19 Thread Daniel Baumann
Daniel Baumann wrote:
> passwd -d

typo, should be 'passwd -d root' instead.

-- 
Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:  daniel.baum...@panthera-systems.net
Internet:   http://people.panthera-systems.net/~daniel-baumann/


-- 
To UNSUBSCRIBE, email to debian-live-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



invalid option

2009-06-19 Thread Umarzuki Mochlis
by referring to the manual, i try a quick one liner command and surprised
that most options are incorrect
are the options changed already or i did miss anything?

below is the command and output, thanks

lh_build -a i386 -p rescue --apt aptitude --hostname debian-rescue
--username rescue --mirror-bootstrap "http://ftp.tw.debian.org/debian/";
mirror-chroot "http://ftp.tw.debian.org/debian/"; syslinux-timeout 10
--packages "clamav clamav-freshclam"
lh_build: invalid option -- a
lh_build: invalid option -- p
lh_build: unrecognized option `--apt'
lh_build: unrecognized option `--hostname'
lh_build: unrecognized option `--username'
lh_build: unrecognized option `--mirror-bootstrap'
lh_build: unrecognized option `--packages'


-- 
Regards,

Umarzuki Mochlis
http://gameornot.net


Re: invalid option

2009-06-19 Thread Daniel Baumann
Umarzuki Mochlis wrote:
> or i did miss anything?

you did.

lh_build doesn't take arguments (except the live-helper common options),
but lh_config does. generally, such questions can be easily answered by
reading the manpage.

-- 
Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:  daniel.baum...@panthera-systems.net
Internet:   http://people.panthera-systems.net/~daniel-baumann/


-- 
To UNSUBSCRIBE, email to debian-live-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: [PATCHES] fix for Ubuntu support, live-initramfs

2009-06-19 Thread Daniel Baumann
update on the matter..

Luigi Capriotti wrote:
> * lack of 'wc' support in initrd busybox

13:14:44 < lcapriotti> FYI, busybox (1:1.13.3-1ubuntu1) karmic *
[initramfs] Include wc for the benefit of live-initramfs (LP: #387944).

> * lack of /lib/udev/cdrom_id in Jaunty

unknown; does it also apply for karmic?

> * invalid mangling of /etc/event.d/tty*

applied.

-- 
Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
Email:  daniel.baum...@panthera-systems.net
Internet:   http://people.panthera-systems.net/~daniel-baumann/


-- 
To UNSUBSCRIBE, email to debian-live-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org



Re: invalid option

2009-06-19 Thread Umarzuki Mochlis
2009/6/20 Daniel Baumann 

> Umarzuki Mochlis wrote:
> > or i did miss anything?
>
> you did.
>
> lh_build doesn't take arguments (except the live-helper common options),
> but lh_config does. generally, such questions can be easily answered by
> reading the manpage.
>

ah...toying early in the morning takes it tolls. Thanks.

>
> --
> Address:Daniel Baumann, Burgunderstrasse 3, CH-4562 Biberist
> Email:  daniel.baum...@panthera-systems.net
> Internet:   
> http://people.panthera-systems.net/~daniel-baumann/
>
>
> --
> To UNSUBSCRIBE, email to debian-live-requ...@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact
> listmas...@lists.debian.org
>
>


-- 
Regards,

Umarzuki Mochlis
http://gameornot.net


Re: Root password problem

2009-06-19 Thread tomas
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

On Fri, Jun 19, 2009 at 11:12:51AM -0400, Adam Mooz wrote:
> Hey list,

[...]

>   [...]  Allowing sudo su access might not be the best idea
> for the implementation so in the final disk I'd like to avoid using sudo.

Then I wrote:

> Do you really need a root password? Note that the standard live user has
> sudo capabilities.

Oops. Sorry, Adam for not reading your question thoroughly. Must have
been somewhat sleep-deprived then.

Regards
- -- tomás
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFKPGYnBcgs9XrR2kYRAg79AJ9vKoPMyYJKKib5uo2DFe5BwWb0MgCffZM8
V/m3NrV7ggDaTbz1qT57On8=
=2aiR
-END PGP SIGNATURE-


-- 
To UNSUBSCRIBE, email to debian-live-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org