Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[TIP] Install eclair d'une image disque universelle
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index French
View previous topic :: View next topic  
Author Message
kernelsensei
Bodhisattva
Bodhisattva


Joined: 22 Feb 2004
Posts: 5619
Location: Woustviller/Moselle/FRANCE (49.07°N;7.02°E)

PostPosted: Tue Nov 09, 2004 10:02 am    Post subject: [TIP] Install eclair d'une image disque universelle Reply with quote

La je suis au boulot, et mon collegue vient de me montrer un truc hallucinant ! netcat ...

Donc pour commencer, vous vous faites un systeme sur mesure avec un kernel relativement universel, et apres c'est partit, pas besoin de faire un cd de boot ou des choses du style ! (une knoppix par exemple suffira)

Vous faites une image de votre partition contenant votre systeme "universel" avec dd
Code:
dd if=/dev/hdxX of=universal.image


en suite, il vous faut netcat donc on l'emerge ...

SUR LA MACHINE CIBLE

Code:
nc -l -p <port_que_vous_voulez> | dd of=/dev/<disque_partition_cible>


SUR LA MACHINE CONTENANT L'IMAGE

Code:
cat image.universal |nc <HOST_CIBLE> <PORT>


Voila, je tape ce TIP en coup de vent, il se peut qu'il y ait des erreurs !
_________________
$ ruby -e'puts " .:@BFegiklnorst".unpack("x4ax7aaX6ax5aX15ax4aax6aaX7ax2aX5aX8 \
axaX3ax8aX4ax6aX3aX6ax3ax3aX9ax4ax2aX9axaX6ax3aX2ax4ax3aX4aXaX12ax10aaX7a").join'


Last edited by kernelsensei on Tue Nov 09, 2004 6:40 pm; edited 2 times in total
Back to top
View user's profile Send private message
bosozoku
Advocate
Advocate


Joined: 11 Jan 2004
Posts: 2431
Location: Roazhon

PostPosted: Tue Nov 09, 2004 10:06 am    Post subject: Reply with quote

Je vais paraître idiot mais est ce que tu peux expliquer vite fait comment ça marche ?

Et accessoirement quel est ton boulot car apparement tu boss sous linux ^^
_________________
Stationlinux.org - Wiki Fvwm FR - Config Fvwm
Back to top
View user's profile Send private message
boozo
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3193

PostPosted: Tue Nov 09, 2004 12:08 pm    Post subject: Reply with quote

'alute !
J'ai également deux petites questions :
dd prend la sortie du pipe en entrée par default ????
[nc -l -p <port_que_vous_voulez> | dd of=/dev/<disque_partition_cible>]
Comment çà se comporte dans /proc ?
merci

:)
Back to top
View user's profile Send private message
boozo
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3193

PostPosted: Tue Nov 09, 2004 12:57 pm    Post subject: Reply with quote

re-
en fait j'ai pas été clair tout-à-l'heure
je voulais savoir si dd pouvait prendre l'output d'une commande directement en paramètre pour if, pour faire çà via un tunnel ssh par exemple non ?
sinon peut-être que :
dd if=/dev/hdXx | nc <HOST_CIBLE> <PORT> (sur l'hote contenant l'img)

nc -l -p <port_que_vous_voulez> | dd of=/dev/<disque_partition_cible> (sur celui à déployer)

serait plus concis :?:
pour l'autre question : le noyau ne risque pas de geler non ?

re-merci

:)
Back to top
View user's profile Send private message
kernelsensei
Bodhisattva
Bodhisattva


Joined: 22 Feb 2004
Posts: 5619
Location: Woustviller/Moselle/FRANCE (49.07°N;7.02°E)

PostPosted: Tue Nov 09, 2004 6:27 pm    Post subject: Reply with quote

Il est vrai que je ne l'ai pas precise, mais au moment ou je cree l'image, le systeme image n'est pas actif, je le fais soit a partir d'un liveCD soit a partir d'une autre partoche !

Autrement, vu que la commande marche, je pense que oui, dd prends l'entree standart comme un if=

Concernant la remarque pour le faire directement a partir de la partoche, je n'ai pas essaye, je ne sais pas si il accepte une commande sans of=

Mais dans tous les cas, l'image a un avantage, on peut la trimbaler facilement et la ramener a une install party par exemple ! (ben ouais, on transfere plus facilement une image sur son laptop, par exemple, qu'une arborescence brute !)
_________________
$ ruby -e'puts " .:@BFegiklnorst".unpack("x4ax7aaX6ax5aX15ax4aax6aaX7ax2aX5aX8 \
axaX3ax8aX4ax6aX3aX6ax3ax3aX9ax4ax2aX9axaX6ax3aX2ax4ax3aX4aXaX12ax10aaX7a").join'


Last edited by kernelsensei on Tue Nov 09, 2004 6:31 pm; edited 2 times in total
Back to top
View user's profile Send private message
kernelsensei
Bodhisattva
Bodhisattva


Joined: 22 Feb 2004
Posts: 5619
Location: Woustviller/Moselle/FRANCE (49.07°N;7.02°E)

PostPosted: Tue Nov 09, 2004 6:30 pm    Post subject: Reply with quote

bosozoku wrote:
Je vais paraître idiot mais est ce que tu peux expliquer vite fait comment ça marche ?

Et accessoirement quel est ton boulot car apparement tu boss sous linux ^^


Ben grosso modo, comme je vois le truc, c'est :

Code:
cat fichier.image > {reseau} > /dev/hdXX


autrement, je suis admin linux a la fac !
_________________
$ ruby -e'puts " .:@BFegiklnorst".unpack("x4ax7aaX6ax5aX15ax4aax6aaX7ax2aX5aX8 \
axaX3ax8aX4ax6aX3aX6ax3ax3aX9ax4ax2aX9axaX6ax3aX2ax4ax3aX4aXaX12ax10aaX7a").join'
Back to top
View user's profile Send private message
bosozoku
Advocate
Advocate


Joined: 11 Jan 2004
Posts: 2431
Location: Roazhon

PostPosted: Tue Nov 09, 2004 6:34 pm    Post subject: Reply with quote

Tu peux faire une image systeme d'un post sur le reseau ?
Mais comment peut tu accéder au systeme cible si tu as des droits limités ? (pardon de mon ignorance...)
_________________
Stationlinux.org - Wiki Fvwm FR - Config Fvwm
Back to top
View user's profile Send private message
kernelsensei
Bodhisattva
Bodhisattva


Joined: 22 Feb 2004
Posts: 5619
Location: Woustviller/Moselle/FRANCE (49.07°N;7.02°E)

PostPosted: Tue Nov 09, 2004 6:38 pm    Post subject: Reply with quote

euh, a priori j'ai pas ete clair !

si tu veux, j'envoie le contenu d'une image en brut a travers le reseau, je recupere ces donnees brutes en ecoutant avec nc sur le port cible, et apres je le passe a dd pour qu'il jette ces donnees brutes sur la partoches cible !

pour les droits, ben ils sont pas limités, du moins pas pour l'admin ou celui qui boot sur un liveCD :D
_________________
$ ruby -e'puts " .:@BFegiklnorst".unpack("x4ax7aaX6ax5aX15ax4aax6aaX7ax2aX5aX8 \
axaX3ax8aX4ax6aX3aX6ax3ax3aX9ax4ax2aX9axaX6ax3aX2ax4ax3aX4aXaX12ax10aaX7a").join'
Back to top
View user's profile Send private message
bosozoku
Advocate
Advocate


Joined: 11 Jan 2004
Posts: 2431
Location: Roazhon

PostPosted: Tue Nov 09, 2004 6:40 pm    Post subject: Reply with quote

Ah oué exellent ! :D
_________________
Stationlinux.org - Wiki Fvwm FR - Config Fvwm
Back to top
View user's profile Send private message
boozo
Advocate
Advocate


Joined: 01 Jul 2004
Posts: 3193

PostPosted: Tue Nov 09, 2004 6:54 pm    Post subject: Reply with quote

M'a l'air vachement bien ce truc là....en plus c'est simple à mettre en oeuvre
Merci pour ces précisions, je vais essayer un bkup dès que possible avec cette methode :D
Back to top
View user's profile Send private message
theturtle123
l33t
l33t


Joined: 19 Sep 2003
Posts: 621
Location: Lille, France

PostPosted: Tue Nov 09, 2004 6:59 pm    Post subject: Reply with quote

quand je pense que j'ai installé deux portables identiques en transférant toute l'arborescence via le réseau (youpi les milliers de ptits fichiers)
un seul reproche :
t'aurais dû poster ça avant :wink:
Back to top
View user's profile Send private message
kernelsensei
Bodhisattva
Bodhisattva


Joined: 22 Feb 2004
Posts: 5619
Location: Woustviller/Moselle/FRANCE (49.07°N;7.02°E)

PostPosted: Tue Nov 09, 2004 7:09 pm    Post subject: Reply with quote

theturtle123 wrote:
quand je pense que j'ai installé deux portables identiques en transférant toute l'arborescence via le réseau (youpi les milliers de ptits fichiers)
un seul reproche :
t'aurais dû poster ça avant :wink:


je peux retourner la remarque .... t'aurais pu attendre avant d'installer les 2 portables :D
_________________
$ ruby -e'puts " .:@BFegiklnorst".unpack("x4ax7aaX6ax5aX15ax4aax6aaX7ax2aX5aX8 \
axaX3ax8aX4ax6aX3aX6ax3ax3aX9ax4ax2aX9axaX6ax3aX2ax4ax3aX4aXaX12ax10aaX7a").join'
Back to top
View user's profile Send private message
kernelsensei
Bodhisattva
Bodhisattva


Joined: 22 Feb 2004
Posts: 5619
Location: Woustviller/Moselle/FRANCE (49.07°N;7.02°E)

PostPosted: Tue Nov 09, 2004 7:10 pm    Post subject: Reply with quote

boozo wrote:
M'a l'air vachement bien ce truc là....en plus c'est simple à mettre en oeuvre
Merci pour ces précisions, je vais essayer un bkup dès que possible avec cette methode :D


ouais, je pense que ya moyen de faire des trucs pas mal avec netcat ... :D
_________________
$ ruby -e'puts " .:@BFegiklnorst".unpack("x4ax7aaX6ax5aX15ax4aax6aaX7ax2aX5aX8 \
axaX3ax8aX4ax6aX3aX6ax3ax3aX9ax4ax2aX9axaX6ax3aX2ax4ax3aX4aXaX12ax10aaX7a").join'
Back to top
View user's profile Send private message
theturtle123
l33t
l33t


Joined: 19 Sep 2003
Posts: 621
Location: Lille, France

PostPosted: Tue Nov 09, 2004 7:14 pm    Post subject: Reply with quote

un truc un peu dommage c'est qu'on doive faire l'image... si c'est un système relativement gros, ça peut poser des problèmes de place...
on peut pas faire le bourrin ?
genre en bootant un live cd sur les deux bécanes et
Code:
cat /dev/zob |nc <HOST_CIBLE> <PORT>

?
(oui, j'avais prévenu, à la bourrin :wink:)
Back to top
View user's profile Send private message
Trevoke
Advocate
Advocate


Joined: 04 Sep 2004
Posts: 4099
Location: NY, NY

PostPosted: Tue Nov 09, 2004 7:18 pm    Post subject: Reply with quote

Bon. kernel-sensei, hop, hijack, on a besoin de toi dans le thread "reboot post-install" ...
_________________
Votre moment detente
What is the nature of conflict?
Back to top
View user's profile Send private message
bosozoku
Advocate
Advocate


Joined: 11 Jan 2004
Posts: 2431
Location: Roazhon

PostPosted: Tue Nov 09, 2004 7:19 pm    Post subject: Reply with quote

Trevoke wrote:
Bon. kernel-sensei, hop, hijack, on a besoin de toi dans le thread "reboot post-install" ...

C'est ici : https://forums.gentoo.org/viewtopic.php?t=249338
_________________
Stationlinux.org - Wiki Fvwm FR - Config Fvwm
Back to top
View user's profile Send private message
kernelsensei
Bodhisattva
Bodhisattva


Joined: 22 Feb 2004
Posts: 5619
Location: Woustviller/Moselle/FRANCE (49.07°N;7.02°E)

PostPosted: Tue Nov 09, 2004 7:22 pm    Post subject: Reply with quote

theturtle123 wrote:
un truc un peu dommage c'est qu'on doive faire l'image... si c'est un système relativement gros, ça peut poser des problèmes de place...
on peut pas faire le bourrin ?
genre en bootant un live cd sur les deux bécanes et
Code:
cat /dev/zob |nc <HOST_CIBLE> <PORT>

?
(oui, j'avais prévenu, à la bourrin :wink:)


essaye et tiens moi au courant ... (enfin, je peux essayer aussi quand j'aurais le temps !)
_________________
$ ruby -e'puts " .:@BFegiklnorst".unpack("x4ax7aaX6ax5aX15ax4aax6aaX7ax2aX5aX8 \
axaX3ax8aX4ax6aX3aX6ax3ax3aX9ax4ax2aX9axaX6ax3aX2ax4ax3aX4aXaX12ax10aaX7a").join'
Back to top
View user's profile Send private message
theturtle123
l33t
l33t


Joined: 19 Sep 2003
Posts: 621
Location: Lille, France

PostPosted: Tue Nov 09, 2004 7:24 pm    Post subject: Reply with quote

ok je testerai...
on fait souvent des installs party avec mon asso, ça peut toujours servir
Code:
echo "netcat c'est cool" > /dev/brain/corner999
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index French All times are GMT
Page 1 of 1

 
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