Rechercher dans ce blog

mercredi 9 décembre 2009

installer grub

Pour installer grub à partir d'un liveCD avec grub ou bien une linux box.

Copier le dossier genre /boot/grub du liveCD vers le disque de destination

Ensuite lancer grub

#grub

>

Repérer le disque où installer grub

Alors on peut faire au prompt de grub (si les fichiers de boot sont dans /boot/grub)

>find /boot/grub/stage1

et on obtient la liste des hd possibles

(hd0,0)

(hd1,0)

par exemple

Ce que je fais quand il y a plusieurs disques, clefs usb, etc, pour ne pas m'embrouiller, c'est de mettre un fichier genre t.txt dans la racine du disque où installer grub et je fais un

>find /t.txt

et là j'obtiens le disque cible...

ensuite on root le disque et la partition

>root (hdn,m)

puis on installe attention pas de partition indiquée

>setup (hdn)

>quit

Voilà c'est bootable en principe.

Je m'assure toujours que le flag boot est mis sur la partition mais je ne suis pas sûr que ce soit indispensable.

Pour booter sur une partition windows alors que le système est booté sur une carte sd/usb il faut d'abord remapper les drives car windows ne démarre que sur le premier disque.

Donc utiliser genre

title XP

map (hd1) (hd0)

map (hd0) (hd1)

root (hd1,1)

chainloader +1  

Manuel de grub

Toutes les commandes de grub

http://www.gnu.org/software/grub/manual/grub.html#Commands

Extrait :

4.2.6 DOS/Windows

GRUB cannot boot DOS or Windows directly, so you must chain-load them (see Chain-loading). However, their boot loaders have some critical deficiencies, so it may not work to just chain-load them. To overcome the problems, GRUB provides you with two helper functions.

If you have installed DOS (or Windows) on a non-first hard disk, you have to use the disk swapping technique, because that OS cannot boot from any disks but the first one. The workaround used in GRUB is the command map (see map), like this:

   grub> map (hd0) (hd1)

   grub> map (hd1) (hd0)

This performs a virtual swap between your first and second hard drive.

Caution: This is effective only if DOS (or Windows) uses BIOS to access the swapped disks. If that OS uses a special driver for the disks, this probably won't work.

Another problem arises if you installed more than one set of DOS/Windows onto one disk, because they could be confused if there are more than one primary partitions for DOS/Windows. Certainly you should avoid doing this, but there is a solution if you do want to do so. Use the partition hiding/unhiding technique.

If GRUB hides a DOS (or Windows) partition (see hide), DOS (or Windows) will ignore the partition. If GRUB unhides a DOS (or Windows) partition (see unhide), DOS (or Windows) will detect the partition. Thus, if you have installed DOS (or Windows) on the first and the second partition of the first hard disk, and you want to boot the copy on the first partition, do the following:

   grub> unhide (hd0,0)

   grub> hide (hd0,1)

   grub> rootnoverify (hd0,0)

   grub> chainloader +1

   grub> makeactive

   grub> boot

mercredi 21 octobre 2009

samba complitly disabling print

load printers = no

printing = bsd

printcap name = /dev/null

disable spoolss = yes


vendredi 16 octobre 2009

Add & Remove system V init links update-rc.d

update-rc.d - Pour installer ou supprimer les liens vers les scripts d'initialisation de type System-V

Par exemple pour mysql :

update-rc.d mysql defaults 21

update-rc.d mysql-ndb defaults 22

update-rc.d mysql-ndb-mgm defaults 23

Voir aussi install sysv-rc.conf

samedi 10 octobre 2009

Unable to print file to - client-error-bad-request

Surveiller /var/log/cups/error.log

message :

E [] Unsupported character set “iso-8859-1″!

Restart samba

LANG=fr_BE.UTF-8 /etc/init.d/samba restart

mercredi 7 octobre 2009

FIX TIME MACHINE AFTER CHANGING NETWORK INTERFACE

HOT-TO FIX TIME MACHINE MAC OS 10.5.8 AFTER CHANGING NETWORK INTERFACE

Changes to do with the backup drive

cd /Volumes/BACKUP_DRIVE

xattr -l *

pour lister les attributs étendus des fichiers présents.

Sur certains drives Backups.backupdb a un attribut avec la mac address et d'autres non...

Si mac address alors la changer avec la nouvelle

Tout d'abord couper l'acl

fsaclctl -p "/Volumes/BACKUP_DRIVE" -d

écrire la nouvelle adresse

xattr -w com.apple.backupd.BackupMachineAddress 00:1d:60:c1:d9:50 Backups.backupdb

Aller au dir de la machine

cd plutonX

xattr -w com.apple.backupd.BackupMachineAddress 00:1d:60:c1:d9:50 plutonX

réactiver l'acl

fsaclctl -p "/Volumes/BACKUP_DRIVE" -e

changes to do with the network infos

Je n'ai pas pu redémarrer time machine sur ma machine tant que je n'ai pas aussi fait ces changements qui consistent à "reseter" le nom bsd de l'interface à supposer que la précédente carte ethernet était "en0"

J'ai supprimé du dir

/Library/Preferences/SystemConfiguration/

les trois fichiers suivants :

NetworkInterfaces.plist

com.apple.network.identification.plist

preferences.plist

Ensuite reboot et reconfigurer le réseau.

A l'aide de OSXTools86 j'ai aussi réappliqué le fix tile machine (mais je ne pense pas que c'était nécessaire).

mardi 22 septembre 2009

microsoft excel (mac) - print as pdf - page setup dialog

Pour imprimer en un seul fichier PDF la totalité du workbook il faut bien prendre garde que dans le Page setup de chaque feuille le First Page number est à auto, car si l'on spécifie un numéro de page qui n'est pas dans la continuité des pages précédentes, la feuille est imprimée dans un fichier PDF à part.


200909221533.jpg