Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!

Ogłoszenie

Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.

#1  2012-08-03 11:26:46

  g0rn - #! Where there is a shell, there is a way

g0rn
#! Where there is a shell, there is a way
Skąd: ~/.linux/dug
Zarejestrowany: 2011-06-15

Problem chroot

# mkdir /mnt/root
# mount -t ext4 /dev/sda3 /mnt/root
# mount -t proc none /mnt/root/proc
# mount -o bind /dev/ /mnt/root/dev
# chroot /mnt/root /bin/bash

bash: /usr/share/bash-completion/bash_completion: No such file or directory[/quote]
# chroot "$LFS" /tools/bin/env -i HOME=/root TERM="$TERM" PS1='\u:\w\$ ' PATH=/bin:/usr/bin:/sbin:/usr/sbin:/tools/bin /tools/bin/bash --login +h

bash: chroot: command not found[/quote]

Ostatnio edytowany przez g0rn (2012-08-03 11:37:22)


[img]http://i56.tinypic.com/s1os3k.gif[/img]

Offline

 

#2  2012-08-03 11:28:15

  ArnVaker - Kapelusznik

ArnVaker
Kapelusznik
Skąd: Midgard
Zarejestrowany: 2009-05-06

Re: Problem chroot

Katalog /usr na osobnej partycji?


[img]http://svn.debianart.org/themes/generic/spinner/spinner48px-moreblue.png[/img]

Offline

 

#3  2012-08-03 11:39:39

  g0rn - #! Where there is a shell, there is a way

g0rn
#! Where there is a shell, there is a way
Skąd: ~/.linux/dug
Zarejestrowany: 2011-06-15

Re: Problem chroot

Niby tak, tylko nie wiem na ktorej


[img]http://i56.tinypic.com/s1os3k.gif[/img]

Offline

 

#4  2012-08-03 11:40:30

  ArnVaker - Kapelusznik

ArnVaker
Kapelusznik
Skąd: Midgard
Zarejestrowany: 2009-05-06

Re: Problem chroot

W fstabie tego systemu do którego chcesz się chrootnąć zobacz.


[img]http://svn.debianart.org/themes/generic/spinner/spinner48px-moreblue.png[/img]

Offline

 

#5  2012-08-03 11:44:06

  g0rn - #! Where there is a shell, there is a way

g0rn
#! Where there is a shell, there is a way
Skąd: ~/.linux/dug
Zarejestrowany: 2011-06-15

Re: Problem chroot

Tu jest chyba jakis mlyn bo fstab pokazuje

cat /etc/fstab

/dev/root  /         ext4    defaults,noatime 0 0
devpts     /dev/pts  devpts  gid=5,mode=620   0 0
tmpfs      /dev/shm  tmpfs   defaults         0 0
proc       /proc     proc    defaults         0 0
sysfs      /sys      sysfs   defaults         0 0


[img]http://i56.tinypic.com/s1os3k.gif[/img]

Offline

 

#6  2012-08-03 11:45:56

  ArnVaker - Kapelusznik

ArnVaker
Kapelusznik
Skąd: Midgard
Zarejestrowany: 2009-05-06

Re: Problem chroot

To jest pewnie fstab z live'a, a nie z tego systemu do którego chcesz się chrootnąć.

Na podstawie pierwszego posta:

Kod:

cat /mnt/root/etc/fstab

[img]http://svn.debianart.org/themes/generic/spinner/spinner48px-moreblue.png[/img]

Offline

 

#7  2012-08-03 11:46:46

  g0rn - #! Where there is a shell, there is a way

g0rn
#! Where there is a shell, there is a way
Skąd: ~/.linux/dug
Zarejestrowany: 2011-06-15

Re: Problem chroot

ano racja

cat /mnt/root/etc/fstab
UUID=DCE80547E805217E                         /media/disk1part1    ntfs         auto,users,ro,dmask=0022,fmask=0133,nls=utf8  0    0   
UUID=0CF40EAFF40E9ADA                         /media/disk1part2    ntfs         auto,users,ro,dmask=0022,fmask=0133,nls=utf8  0    0   
UUID=2507da5c-4894-4b46-ab28-41e9491d80fd     /                    ext4         defaults,relatime,errors=remount-ro           0    1   
UUID=038a4a62-44d0-4b5c-8352-eadb615ea927     /usr                 ext4         defaults,relatime,errors=remount-ro           0    2   
UUID=30ee4470-9bca-4d65-9b0f-9949b30fee9c     /var                 reiserfs     defaults,relatime                             0    2   
UUID=4755207d-8e61-430b-a2b8-77dc89ca28ea     none                 swap         sw                                            0    0   
UUID=b8ef8c8f-5e52-4bf8-9226-9447b6907694     /tmp                 ext3         defaults,relatime,errors=remount-ro           0    2   
UUID=b92c6e98-ec37-4e3c-9931-5333f8ba2ba1     /home                ext4         defaults,relatime,errors=remount-ro           0    2


[img]http://i56.tinypic.com/s1os3k.gif[/img]

Offline

 

#8  2012-08-03 11:47:53

  ArnVaker - Kapelusznik

ArnVaker
Kapelusznik
Skąd: Midgard
Zarejestrowany: 2009-05-06

Re: Problem chroot

Kod:

ls -l /dev/disk/by-uuid/

I już będziesz wiedział która jest która. :)


[img]http://svn.debianart.org/themes/generic/spinner/spinner48px-moreblue.png[/img]

Offline

 

#9  2012-08-03 11:49:24

  g0rn - #! Where there is a shell, there is a way

g0rn
#! Where there is a shell, there is a way
Skąd: ~/.linux/dug
Zarejestrowany: 2011-06-15

Re: Problem chroot

czyli podmontowac /usr ?


[img]http://i56.tinypic.com/s1os3k.gif[/img]

Offline

 

#10  2012-08-03 11:51:07

  ArnVaker - Kapelusznik

ArnVaker
Kapelusznik
Skąd: Midgard
Zarejestrowany: 2009-05-06

Re: Problem chroot

Tak, /var też, /home jeśli coś masz zamiar robić w chroocie na /home. Możesz od razu po UUID montować:

Kod:

mount UUID=038a4a62-44d0-4b5c-8352-eadb615ea927 /mnt/root/usr
mount UUID=30ee4470-9bca-4d65-9b0f-9949b30fee9c /mnt/root/var

[img]http://svn.debianart.org/themes/generic/spinner/spinner48px-moreblue.png[/img]

Offline

 

#11  2012-08-03 11:56:21

  g0rn - #! Where there is a shell, there is a way

g0rn
#! Where there is a shell, there is a way
Skąd: ~/.linux/dug
Zarejestrowany: 2011-06-15

Re: Problem chroot

mount UUID=30ee4470-9bca-4d65-9b0f-9949b30fee9c /mnt/root/var

mount: unknown filesystem type 'reiserfs'

co z tym fantem


[img]http://i56.tinypic.com/s1os3k.gif[/img]

Offline

 

#12  2012-08-03 11:58:30

  ArnVaker - Kapelusznik

ArnVaker
Kapelusznik
Skąd: Midgard
Zarejestrowany: 2009-05-06

Re: Problem chroot

Wygląda jakby nie było obsługi reiserfs. ;) Co to za system? Co zwraca poniższe polecenie?

Kod:

modprobe reiserfs

[img]http://svn.debianart.org/themes/generic/spinner/spinner48px-moreblue.png[/img]

Offline

 

#13  2012-08-03 11:59:14

  g0rn - #! Where there is a shell, there is a way

g0rn
#! Where there is a shell, there is a way
Skąd: ~/.linux/dug
Zarejestrowany: 2011-06-15

Re: Problem chroot

oki , dzieki ArnVaker jest chroot , dalej dam rade ale widze ze musze troszke postudiowac faq duga


[img]http://i56.tinypic.com/s1os3k.gif[/img]

Offline

 

Stopka forum

Powered by PunBB
© Copyright 2002–2005 Rickard Andersson
To nie jest tylko forum, to nasza mała ojczyzna ;-)

[ Generated in 0.029 seconds, 15 queries executed ]

Informacje debugowania

Time (s) Query
0.00011 SET CHARSET latin2
0.00004 SET NAMES latin2
0.00182 SELECT u.*, g.*, o.logged FROM punbb_users AS u INNER JOIN punbb_groups AS g ON u.group_id=g.g_id LEFT JOIN punbb_online AS o ON o.ident='3.135.205.231' WHERE u.id=1
0.00100 UPDATE punbb_online SET logged=1732239273 WHERE ident='3.135.205.231'
0.00025 SELECT * FROM punbb_online WHERE logged<1732238973
0.00103 DELETE FROM punbb_online WHERE ident='18.117.70.64'
0.00067 DELETE FROM punbb_online WHERE ident='18.216.104.106'
0.00062 DELETE FROM punbb_online WHERE ident='3.137.164.229'
0.00301 DELETE FROM punbb_online WHERE ident='85.208.96.200'
0.01308 SELECT topic_id FROM punbb_posts WHERE id=208035
0.00028 SELECT id FROM punbb_posts WHERE topic_id=21737 ORDER BY posted
0.00044 SELECT t.subject, t.closed, t.num_replies, t.sticky, f.id AS forum_id, f.forum_name, f.moderators, fp.post_replies, 0 FROM punbb_topics AS t INNER JOIN punbb_forums AS f ON f.id=t.forum_id LEFT JOIN punbb_forum_perms AS fp ON (fp.forum_id=f.id AND fp.group_id=3) WHERE (fp.read_forum IS NULL OR fp.read_forum=1) AND t.id=21737 AND t.moved_to IS NULL
0.00045 SELECT search_for, replace_with FROM punbb_censoring
0.00094 SELECT u.email, u.title, u.url, u.location, u.use_avatar, u.signature, u.email_setting, u.num_posts, u.registered, u.admin_note, p.id, p.poster AS username, p.poster_id, p.poster_ip, p.poster_email, p.message, p.hide_smilies, p.posted, p.edited, p.edited_by, g.g_id, g.g_user_title, o.user_id AS is_online FROM punbb_posts AS p INNER JOIN punbb_users AS u ON u.id=p.poster_id INNER JOIN punbb_groups AS g ON g.g_id=u.group_id LEFT JOIN punbb_online AS o ON (o.user_id=u.id AND o.user_id!=1 AND o.idle=0) WHERE p.topic_id=21737 ORDER BY p.id LIMIT 0,25
0.00207 UPDATE punbb_topics SET num_views=num_views+1 WHERE id=21737
Total query time: 0.02581 s