Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[mini-HowTo] Gentoo Linux LiveCD for Dummies!
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 10, 11, 12 ... 19, 20, 21  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
ahorn
Guru
Guru


Joined: 01 Nov 2004
Posts: 366
Location: Ol' europe

PostPosted: Thu Mar 03, 2005 5:47 pm    Post subject: Reply with quote

As you see, the kernel boots, so grub is working fine. UDF is simply an added feature i dont use (a relict of by .config). i deactivated it and the error msg is the same like above but without the UDF line. So it's not UDF and, of course, i burned the iso normally. i'm using an athlon64 and i have gcc with multilib and i use also ~amd64, not ~x86 for ACCEPT_KEYWORDS. It's a kernel issue or maybe the initrd must be other as the x86 way.
_________________
Too many connections. Please try again later.
Back to top
View user's profile Send private message
LarryLeffa
n00b
n00b


Joined: 12 May 2004
Posts: 24
Location: Germany

PostPosted: Fri Mar 04, 2005 8:47 am    Post subject: Reply with quote

ahorn wrote:
As you see, the kernel boots, so grub is working fine. UDF is simply an added feature i dont use (a relict of by .config). i deactivated it and the error msg is the same like above but without the UDF line. So it's not UDF and, of course, i burned the iso normally. i'm using an athlon64 and i have gcc with multilib and i use also ~amd64, not ~x86 for ACCEPT_KEYWORDS. It's a kernel issue or maybe the initrd must be other as the x86 way.

Ah, yes! Okay; I compiled my BootCD entirely using -march=pentium and ARCH="x86" (except grub) to ensure it's working on all x86-platforms beginning from pentium.
My goal was creating a BootCD which is capable of scanning for viruses on NTFS-Partitions ;)
So no clue by me for now for AMD64. But stay tuned: I'm using Gentoo64 very successfully on AMD64 about one year. Will try to reproduce my steps creating this BootCD on AMD64; maybe this weekend, ok?

BTW:
- Running my x86-BootCD on AMD64 works PERFECTLY!
- What version of kernel you're using on your AMD64?
_________________
- Es gibt keine Probleme, nur Lösungen! -
Back to top
View user's profile Send private message
ahorn
Guru
Guru


Joined: 01 Nov 2004
Posts: 366
Location: Ol' europe

PostPosted: Fri Mar 04, 2005 10:18 am    Post subject: Reply with quote

I'm using 2.6.10-morph25, it's my favorite patchset and it works very well if it is not on livecd :p
At first, i was also trying to make a x86 cd, but some less or more packages detect automaticly my cpu and used another compiler, but this was fixable. the to the end my big problem was, i never got it to run on my pentium classic, i forced the arch to x86 anytime in this creation but without luck.
anyway, i see you're a german, my too, so maybe we can talk in the IRC. i'm on #gentoo at irc.freenet.de, it would be nice if you talk to me if you have more tipps or you can tell me how you done it x86 on amd64.
_________________
Too many connections. Please try again later.
Back to top
View user's profile Send private message
MixMax
n00b
n00b


Joined: 28 Jan 2005
Posts: 73
Location: Finland

PostPosted: Fri Mar 04, 2005 11:56 am    Post subject: Reply with quote

ahorn: Did you compile squasfs support in to the kernell?
Back to top
View user's profile Send private message
Wolven
Guru
Guru


Joined: 05 Aug 2003
Posts: 325
Location: Norway

PostPosted: Fri Mar 04, 2005 4:15 pm    Post subject: Reply with quote

Hello. I've been working on a LiveCD for the past few days and I have a question: Does anyone know how to make /home/username work? I've managed to get /home to be writeable, but there is no username in /home on boot.
I have added a regular user with 'useradd' and I would like to have a /home/username just like Knoppix has /home/knoppix.
I've read all the posts in this tread a few times, but I don't see it mentioned anywhere. Mabye I'm just blind or there is something about the nauture of the LiveCD I'm not grasping.

Any hints on how to do this, or explanation to why this is not necessary/feasible would be appreciated.
Back to top
View user's profile Send private message
MixMax
n00b
n00b


Joined: 28 Jan 2005
Posts: 73
Location: Finland

PostPosted: Fri Mar 04, 2005 5:18 pm    Post subject: Reply with quote

I used the same kind of method for other users as for the root.
Here is the part from the build script
Code:

cd ../home/(username)/
tar zcvpf ../../../target/files/(username).tar.gz * .[[:alnum:]]*


and the extra lines in linuxrc
Code:

mkdir /new/home/(username)
mount -t tmpfs  none /new/home/(username)
cd /new/home/(username) && tar zxpf /cdrom/files/(username).tar.gz
Back to top
View user's profile Send private message
schneekater
n00b
n00b


Joined: 28 Jan 2005
Posts: 21
Location: Easton, PA

PostPosted: Fri Mar 04, 2005 6:04 pm    Post subject: Getting man to work. Reply with quote

Hi! This thread seems still alive and healthy afetr all those months, so maybe I could get an answer for a question that has been bothering me for the last few days:

My livecd works quite nicely now, except for man. Whenever I try to view a man page that has never been viewed on the source system, man complains that groff can not find libstdc++.so.5. I am 99% sure that this is bogus: Looks like the real problem is that man is trying to store the formatted man pages and the catdir is not writable.

So, what to do? I tried preformatting all man pages, but that took up about 150MB - more than I am willing to invest. My other thought was to have the catdir reside on a tmpfs. Would that be a viable approach? Or is there a way to turn off the saving of preformatted man pages?

I would really appreciate any help that you could give me.

Thanks for your attention
Back to top
View user's profile Send private message
ahorn
Guru
Guru


Joined: 01 Nov 2004
Posts: 366
Location: Ol' europe

PostPosted: Fri Mar 04, 2005 7:23 pm    Post subject: Reply with quote

MixMax wrote:
ahorn: Did you compile squasfs support in to the kernell?

Yeah, i did it. I checked it over teen times.
The kernel boots, but it hangs at the root fs init.
_________________
Too many connections. Please try again later.
Back to top
View user's profile Send private message
Wolven
Guru
Guru


Joined: 05 Aug 2003
Posts: 325
Location: Norway

PostPosted: Fri Mar 04, 2005 7:57 pm    Post subject: Reply with quote

MixMax wrote:
I used the same kind of method for other users as for the root.
Here is the part from the build script
Code:

cd ../home/(username)/
tar zcvpf ../../../target/files/(username).tar.gz * .[[:alnum:]]*


and the extra lines in linuxrc
Code:

mkdir /new/home/(username)
mount -t tmpfs  none /new/home/(username)
cd /new/home/(username) && tar zxpf /cdrom/files/(username).tar.gz


Thank you for the reply. I feel I'm getting closer, but I still have no /home/username dir. On boot

Here is my linuxcr
Code:

#!/bin/sh
export PATH=/bin

# Get kernel CMDLINE
mount -t proc none /proc
CMDLINE=`cat /proc/cmdline`
umount /proc

# Mount CD device
CDROM=""
for x in hda hdb hdc hdd cdroms/cdrom0 cdroms/cdrom1
do
  mount -t iso9660 -r /dev/${x} /cdrom > /dev/null 2>&1
  if [ "$?" = "0" ]
  then
    CDROM="${x}"
    break
  fi
done

# CD not found
if [ "${CDROM}" == "" ]
then
  exec /bin/sh
  exit
fi

# Mount root and create read-write directories
mount -t squashfs -o loop /cdrom/files/source.img /new > /dev/null 2>&1
mount -t tmpfs -o size=16m none /new/var > /dev/null 2>&1
mount -t tmpfs -o size=16m none /new/etc > /dev/null 2>&1
mount -t tmpfs -o size=16m none /new/tmp > /dev/null 2>&1
mount -t tmpfs -o size=16m none /new/root > /dev/null 2>&1
cd /new/var && tar xpf /cdrom/files/var.tar > /dev/null 2>&1
cd /new/etc && tar xpf /cdrom/files/etc.tar > /dev/null 2>&1
cd /new/root && tar xpf /cdrom/files/root.tar > /dev/null 2>&1

# Establishing the /home/wolvix dir. (Thanks to MixMax)
mkdir /new/home/wolvix
mount -t tmpfs  none /new/home/wolvix
cd /new/home/wolvix && tar xpf /cdrom/files/wolvix.tar

# Pivot root and start real init
cd /new
pivot_root . newroot
exec chroot . /bin/sh <<- EOF >dev/console 2>&1
exec /sbin/init ${CMDLINE}
EOF


And here is my build script
Code:
#!/bin/bash
rm -rf target
mkdir target
cp -a source/boot target/
mkdir target/files
rm -rf source/var/tmp/*
rm -rf source/var/run/*
rm -rf source/var/lock/*
rm -rf source/tmp/*
rm -f source/etc/mtab
touch source/etc/mtab
cd source/etc/
tar cvpf ../../target/files/etc.tar * .[[:alnum:]]*
cd ../var/
tar cvpf ../../target/files/var.tar * .[[:alnum:]]*
cd ../root/
tar cvpf ../../target/files/root.tar * .[[:alnum:]]*
# Saving the /home/wolvix dir. (Thanks to MixMax)
cd ../home/wolvix/
tar cvpf ../../../target/files/wolvix.tar * .[[:alnum:]]*
cd ../../../

mksquashfs source/ target/files/source.img -e usr/src usr/portage usr/lib/gcc-lib
mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size \
4 -boot-info-table -iso-level 4 -hide boot.catalog -o ~/livecd.iso target/


The wolvix.tar file is made and I can see it in the /target/files dir. I can make a /home/wolvix directory, mount it and extract the tar maually after boot, but it's not being done automagicaly. Does the linuxcr and build script look right?
Back to top
View user's profile Send private message
aminal
Apprentice
Apprentice


Joined: 17 Mar 2004
Posts: 170
Location: Baltimore, MD

PostPosted: Fri Mar 04, 2005 8:08 pm    Post subject: Reply with quote

chunderbunny wrote:
Personally I like to exclude a few directories
Code:
mksquashfs source/ target/files/source.img -e usr/src usr/portage --->usr/lib/gcc-lib <---


Man, I tried excluding that dir and it hosed the boot process up pretty bad.
Back to top
View user's profile Send private message
schneekater
n00b
n00b


Joined: 28 Jan 2005
Posts: 21
Location: Easton, PA

PostPosted: Fri Mar 04, 2005 8:14 pm    Post subject: Reply with quote

Wolven wrote:

[...]
# Establishing the /home/wolvix dir. (Thanks to MixMax)
mkdir /new/home/wolvix
mount -t tmpfs none /new/home/wolvix
cd /new/home/wolvix && tar xpf /cdrom/files/wolvix.tar
[...]


Now the $10 question is: Might using 'mkdir -p /new/home/wolvix' help?
mkdir might not create /new/home/wolfix at all if /new/home does not exist yet, but the -p flag should cause it to create the /new/home directory on the fly.
Back to top
View user's profile Send private message
MixMax
n00b
n00b


Joined: 28 Jan 2005
Posts: 73
Location: Finland

PostPosted: Fri Mar 04, 2005 8:15 pm    Post subject: Reply with quote

Wolven: Add this line to linuxrc b4 you try to mkdir /home/(username). Then you should be all set :)
Code:
mount -t tmpfs  none /new/home

EDIT: just a thought that if you want you can just pack and unpack the whole home directory instead of specific user

ahorn: Ok sorry I can't help much more with those morph. I first tryed to use morph sources also but had a lot of trouble with them so I changed to ck sources and had a lot better luck.
Back to top
View user's profile Send private message
ahorn
Guru
Guru


Joined: 01 Nov 2004
Posts: 366
Location: Ol' europe

PostPosted: Fri Mar 04, 2005 9:11 pm    Post subject: Reply with quote

MixMax wrote:

ahorn: Ok sorry I can't help much more with those morph. I first tryed to use morph sources also but had a lot of trouble with them so I changed to ck sources and had a lot better luck.

Yeah, i hope 2.6.11 will bring the livecd flavour.

edit: https://forums.gentoo.org/viewtopic-t-303714.html somebody else got the same problem, it's the kernel.
_________________
Too many connections. Please try again later.
Back to top
View user's profile Send private message
Wolven
Guru
Guru


Joined: 05 Aug 2003
Posts: 325
Location: Norway

PostPosted: Fri Mar 04, 2005 10:14 pm    Post subject: Reply with quote

MixMax wrote:
Wolven: Add this line to linuxrc b4 you try to mkdir /home/(username). Then you should be all set :)
Code:
mount -t tmpfs  none /new/home

EDIT: just a thought that if you want you can just pack and unpack the whole home directory instead of specific user

ahorn: Ok sorry I can't help much more with those morph. I first tryed to use morph sources also but had a lot of trouble with them so I changed to ck sources and had a lot better luck.

Thanks again for the reply, but I can't get this working. In my linuxcr I've tried:

This:
Code:

mount -t tmpfs  none /new/home
mkdir /home/wolvix
mount -t tmpfs  none /new/home/wolvix
cd /new/home/wolvix && tar xpf /cdrom/files/wolvix.tar

This:
Code:
mount -t tmpfs  none /new/home
mkdir -p /home/wolvix
mount -t tmpfs  none /new/home/wolvix
cd /new/home/wolvix && tar xpf /cdrom/files/wolvix.tar

This:
Code:
mount -t tmpfs  none /new/home
mkdir -p /home/wolvix
cd /new/home/wolvix && tar xpf /cdrom/files/wolvix.tar

And this:
Code:
mount -t tmpfs  none /new/home
mkdir -p /home/wolvix
cd /new/home/wolvix && tar xpf /newroot/cdrom/files/wolvix.tar

The build script is still the same as posted above.

There must be something I do wrong. When I extracted the stage tar.gz2 and the portage snapshot I was root. Does this have anything to say?

Is there a way to do this:
Code:
mkdir /home/wolvix
cd /home/wolvix && tar xpf /newroot/cdrom/files/wolvix.tar

Automaticly after the CD is booted? Since I can manage to make /home writable with the linuxcr. And then make the /home/wolvix dir and extract the wolvix.tar manually after bootup.
Back to top
View user's profile Send private message
MixMax
n00b
n00b


Joined: 28 Jan 2005
Posts: 73
Location: Finland

PostPosted: Sat Mar 05, 2005 8:44 am    Post subject: Reply with quote

Do you get any error messages when the linuxrc runs?

could you try this in linuxrc:
Code:

mount -t tmpfs  none /new/home
cd /new/home/ && tar xpf /cdrom/files/home.tar

and this in build:
Code:
cd ../home/
tar cvpf ../../target/files/home.tar * .[[:alnum:]]*


Quote:
Is there a way to do this:
Code:

mkdir /home/wolvix
cd /home/wolvix && tar xpf /newroot/cdrom/files/wolvix.tar

Automaticly after the CD is booted? Since I can manage to make /home writable with the linuxcr. And then make the /home/wolvix dir and extract the wolvix.tar manually after bootup.

If you login with root you could plase those lines in to the root's .bashrc file or if you don't make a small script with those lines and call it from some initscript.
Back to top
View user's profile Send private message
Farkenell
Tux's lil' helper
Tux's lil' helper


Joined: 05 Dec 2003
Posts: 88

PostPosted: Sat Mar 05, 2005 2:46 pm    Post subject: Reply with quote

I've done everything I can to get a valid chrooted system up: (that I know of)

I'm wondering why my img file is so small? its around 400 megs...and I've got stuff like X installed (it totals around gig or two I'm using a dvdr )

the build script seemed to do that, I just did a

mksquashfs source/ target/files/source.img -e source/usr/portage/distfiles

and its still relatively small 400megs or so

*edit: I think I may have found my problem, the grub thingy ;) **lets see if it changes much
Back to top
View user's profile Send private message
yoshi314
l33t
l33t


Joined: 30 Dec 2004
Posts: 848
Location: PL

PostPosted: Sat Mar 05, 2005 8:29 pm    Post subject: Reply with quote

i have a few more of my stupid (IMHO) questions.

linux has rather lots of programs. i wonder how much space would i save by toying with CFLAGS (especially -Os) and switching to uclibc??

and second thing, how can i mount all existing partitions like knoppix does (it created mountpoints like /mnt/hda1 /mnt/hda5 etc, for existing partitions)?
_________________
~amd64
shrink your /usr/portage with squashfs+aufs
Back to top
View user's profile Send private message
Wolven
Guru
Guru


Joined: 05 Aug 2003
Posts: 325
Location: Norway

PostPosted: Mon Mar 07, 2005 6:32 pm    Post subject: Reply with quote

MixMax wrote:
Do you get any error messages when the linuxrc runs?

could you try this in linuxrc:
Code:

mount -t tmpfs  none /new/home
cd /new/home/ && tar xpf /cdrom/files/home.tar

and this in build:
Code:
cd ../home/
tar cvpf ../../target/files/home.tar * .[[:alnum:]]*


No, I'm not getting any error messages about linuxrc. Infact I don't see any message at all about linuxrc on boot.

I tried the new entries in linuxrc and the build script as you describe here, but still no go. This is what I tried before making my first post here, but since that faild me, so I thought it was the wrong way to go abut it. This time I removed the /livecd/target directory before building just to make shure I build a new image with the /home options.

There must be something I've done wrong in the build process of the LiveCD since this will not work. I'm gonna try making a script that extracts the tar into home like you suggested, if that fails I'm gonna start over from scratch.

Thank you for your time.
Back to top
View user's profile Send private message
MixMax
n00b
n00b


Joined: 28 Jan 2005
Posts: 73
Location: Finland

PostPosted: Wed Mar 09, 2005 11:43 am    Post subject: Reply with quote

That sucks :( I've use the apove method in here with out problems. I still can't see anything wrong with your script.
Try adding these line to the very top and the other one to the very buttom of linuxrc.
Code:

#!/bin/sh
export PATH=/bin

echo "Starting initrd..."

Code:
echo In new chroot...
exec /sbin/init ${CMDLINE}
EOF

And then let us know if you see any text during the boot between those lines.
Back to top
View user's profile Send private message
Farkenell
Tux's lil' helper
Tux's lil' helper


Joined: 05 Dec 2003
Posts: 88

PostPosted: Wed Mar 09, 2005 2:48 pm    Post subject: Reply with quote

well got my disc working :)

thanks for the howto :)

I was getting the problem mounting something

UDF-fs no partition found

THe reason was the script wasn't mounting the cdrom properly....I used the method previously which added the cdrom to the for loop in the linuxrc script :) thanks for that :)

Spent 5 days on this too lol, persistence does pay off :D

ere we are :)

x-cnc wrote:
My $.02, which may or may not help out people having trouble:
If your cdrom is always not found you can change this line in linuxrc:
Code:

for x in hda hdb hdc hdd

to:
Code:

for x in hda hdb hdc hdd cdroms/cdrom0 cdroms/cdrom1


Thanks to everyone participating in this thread. I was trying to get this to work for a long time before I found this.
Back to top
View user's profile Send private message
Jerri
Guru
Guru


Joined: 03 Apr 2003
Posts: 353

PostPosted: Thu Mar 10, 2005 1:37 am    Post subject: Reply with quote

I'm really confused with the code below, from what I gather, it creates a tarball of all the files in target/etc/, var/, and root/

so what is the purpose of the last part => .[[:alnum:]]*

A quick look around, reveals that alnum is a predefined class of characters: [0-9A-Za-z]. is this to ensure that all files are tarred.. isn't * sufficient?


Code:
tar cvpf ../../target/files/etc.tar * .[[:alnum:]]*
cd ../var/
tar cvpf ../../target/files/var.tar * .[[:alnum:]]*
cd ../root/
tar cvpf ../../target/files/root.tar * .[[:alnum:]]*



this is what i get when i try to run the code above:
Code:
tar: Removing leading `/' from member names
tar: /root/livecd/etc/.[[\:alnum\:]]*: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
tar: /root/livecd/root/*: Cannot stat: No such file or directory
tar: Error exit delayed from previous errors
Back to top
View user's profile Send private message
Jerri
Guru
Guru


Joined: 03 Apr 2003
Posts: 353

PostPosted: Thu Mar 10, 2005 2:39 am    Post subject: Reply with quote

ok, more problems:

after creating a squashed image, i get the following when I try and run mkisofs:
(livecd is the source directory)
Code:
[root][~/livecd]: mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -iso-level 4 -hide boot.catalog -o /mnt/storage/livecd/livecd.iso /mnt/storage/livecd/
Warning: Creating ISO-9660:1999 (version 2) filesystem.
Warning: ISO-9660 filenames longer than 31 may cause buffer overflows in the OS.
call to search_tree_file with an absolute path, stripping
initial path separator. Hope this was intended...
mkisofs: Uh oh, I cant find the boot image '/root/livecd/boot/grub/stage2_eltorito' !
[root][~/livecd]:


I can't figure it out, stage2_eltorito exists:
Code:
[root][~/livecd]: ls /root/livecd/boot/grub/stage2_eltorito -l
-rw-r--r--  1 root root 143948 Mar  9 21:05 /root/livecd/boot/grub/stage2_eltorito


man mkisofs explains that "The pathname must be relative to the source path specified to mkisofs."

Isn't the path relative to the source? I'm so confused now...
Back to top
View user's profile Send private message
MixMax
n00b
n00b


Joined: 28 Jan 2005
Posts: 73
Location: Finland

PostPosted: Thu Mar 10, 2005 7:25 am    Post subject: Reply with quote

Seems like your not running the tar code exactly like you posted otherwise you shouldn't get the full path in the error message (tar: /root/livecd/etc/.[[\:alnum\:]]*: Cannot stat: No such file or directory)

if you want to use the full path in your tar command it should be something like this:
Code:
 
tar cvpf (path to your target folder)/files/var.tar /root/livecd/etc/* /root/livecd/etc/.[[:alnum:]]*


Your right on what [[:alnum:]] means. Reason why you should have the .[[:alnum:]]* is that it will include all the hiden files in the folder and exlude the . and .. in there (if you would use .* you would have your tar command to follow the .. and you would end up packing everything in there also)


Last edited by MixMax on Thu Mar 10, 2005 7:55 am; edited 1 time in total
Back to top
View user's profile Send private message
MixMax
n00b
n00b


Joined: 28 Jan 2005
Posts: 73
Location: Finland

PostPosted: Thu Mar 10, 2005 7:41 am    Post subject: Reply with quote

Code:
mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -iso-level 4 -hide boot.catalog -o /mnt/storage/livecd/livecd.iso /mnt/storage/livecd/

You've specified the source path as "/mnt/storage/livecd/" so the apove command is trying to find the boot image from /mnt/storage/livecd/boot/grub/stage2_eltorito not in /root/livecd/boot/grub/stage2_eltorito as it seems youd like it to. Try changing the command to:
Code:

mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table -iso-level 4 -hide boot.catalog -o /mnt/storage/livecd/livecd.iso /root/livecd/
and see if that helps :)
Back to top
View user's profile Send private message
Farkenell
Tux's lil' helper
Tux's lil' helper


Joined: 05 Dec 2003
Posts: 88

PostPosted: Thu Mar 10, 2005 6:28 pm    Post subject: Reply with quote

does anyone know how to get mkxf86config.sh to boot into 1280x1024 :) it seems to only want to do a maximum of 1024x768....
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3 ... 10, 11, 12 ... 19, 20, 21  Next
Page 11 of 21

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum