PDA

View Full Version : ripartizionamento


SwOrDoFmYdEsTiNy
22-02-2009, 20:52
salve a tutti, ho da poco installato ubuntu 8.04, perch[ la mia copia di windows aveva smesso di funzionare, e non trovando il cd di windows ho dovuto installare ubuntu (voglia di smanettare Rulez), solo che adesso vorrei ripartizionare il disco (Ho dato tutti i 200gb ad ubuntu) per mettere una versione lite di windows xp e usarla solo per giocare, senza mai farla andare su internet (per tutto il resto c'e ubuntu) vorrei sapere coem si puo fare e che programmi utilizzare! grazie mille a chiunque risponda!!

kernele
22-02-2009, 21:38
Scarica gparted live e masterizza.
http://gparted.sourceforge.net/livecd.php

leggiti questa guida:
http://www.cybermethexis.org/node/332
installi grub nella root di linux e salvi il settore su un pennino-floppy-web-quello che vuoi.

Avvia gparte e fai un resize di buntu
Installa xp nello spazio che ha sottratto a buntu

Con xp avvito, come da guida, copi linux.sec in C: e sistemi boot.ini

SwOrDoFmYdEsTiNy
22-02-2009, 23:01
caspita non riesco a trovare il file linux.sec!!!!

P.s. ma gparted posso fargli fare il boot da chiavetta? mi verrebbe molto piu comodo!!!!!

patel45
23-02-2009, 07:47
scusami kernele, ma perché gli vuoi fare gestire il boot da win ? mi sembra che SwOrDoFmYdEsTiNy abbia intenzione di utilizzare principalmente Ubuntu e non Win.

P.s. ma gparted posso fargli fare il boot da chiavetta? mi verrebbe molto piu comodo!!!!!
certamente, torna sempre utile averlo a disposizione.

kernele
23-02-2009, 11:08
scusami kernele, ma perché gli vuoi fare gestire il boot da win ? mi sembra che SwOrDoFmYdEsTiNy abbia intenzione di utilizzare principalmente Ubuntu e non Win.

Per esperienza, win gestisce molto bene l'avvio di più sistemi operativi, e visto che questo piallerà grub/lilo...........
Avrei fatto un chroot, ma è un lavoro che devi saper fare.

SwOrDoFmYdEsTiNy
23-02-2009, 13:27
Per esperienza, win gestisce molto bene l'avvio di più sistemi operativi, e visto che questo piallerà grub/lilo...........
Avrei fatto un chroot, ma è un lavoro che devi saper fare.


vabbe la cosa importante e che io riesca ad accedere sia a windows che a ubuntu senza dover fare procedure strane!!!!!!!!

p.s. se mi dire dove trovo il file linux.sec e come si puo usare gparted da chiavetta ve ne sarei molto grato!!!!!

kernele
23-02-2009, 13:57
<°-(-(-(-<

SwOrDoFmYdEsTiNy
23-02-2009, 17:56
T_T mi sento stupido!!!! (oppure ammalato, a scelta) non riesco a trovare il file di boot (il tuo e quello di lilo, mentre il mio e quello di grub).....scusate per le mie domande stupide XD

edit. nessuno mi ha ancora detto come si fa a installare gparted sulla chiavetta usb!!!!

patel45
23-02-2009, 18:12
Per esperienza, win gestisce molto bene l'avvio di più sistemi operativi, e visto che questo piallerà grub/lilo...........
Avrei fatto un chroot, ma è un lavoro che devi saper fare.

Non mi sembra corretto consigliare questi metodi ad un principiante, mi sembra più una esibizione di scienza che una offerta di aiuto. Per non parlare di lilo che usano pochissime distro.

kernele
23-02-2009, 18:35
Non mi sembra corretto consigliare questi metodi ad un principiante, mi sembra più una esibizione di scienza che una offerta di aiuto. Per non parlare di lilo che usano pochissime distro.

Incredibile ma vero, chroot è una serie di comandi stupidissimi e non da power-user
mkdir /mnt/a
mount /dev/sdax /mnt/a
mount -o bind /dev /mnt/a/dev
mount -t proc none /mnt/a/proc
chroot /mnt/a /bin/bash
Dimmi dove sta la difficoltà di leggersi un manualino da 20 righe per imparare una cosa così bassa ma importante?
IMHO
può tornare così utile che dovrebbero saperlo fare tutti
/

lilo (uso questo) era un esempio per far capire che che prima di salvare il settore di boot, andava modificato adeguatamente, che sia lilo o grub.

kernele
23-02-2009, 18:49
T_T mi sento stupido!!!! (oppure ammalato, a scelta) non riesco a trovare il file di boot (il tuo e quello di lilo, mentre il mio e quello di grub).....scusate per le mie domande stupide XD

Quello che interessa a te si chiama menu.lst e si trova in /boot/grub/menu.lst
Avere dei problemi da risolvere, è una buona occasione per imparare qualcosina :fagiano:

Non trovo menu.lst!

Fra i tanti comandi utilissimi per cercare uno o più file esiste locate.
Cos'è locate? Alla prossima puntata
A cosa serve? A cercare uno o più file con quel nome in comune
Come si installa? Solitamente è installato di default da tutte le distro
Come si usa? Il database potrebbe non essere aggiornato quotidianamente come archlinux.
Aggiorno il db? come? da root/admin/sudo si dà il comando
updatedb
Ok, adesso che è aggiornato come faccio le mie ricerche? Così!
locate nome_file
[maux@laptop ~]$ locate menu.lst
/boot/grub/menu.lst
/boot/grub/menu.lst.pacnew
/boot/grub/menu.lst.pacsave
/boot/grub/menu.lst~
[maux@laptop ~]$

nessuno mi ha ancora detto come si fa a installare gparted sulla chiavetta usb!!!!
Io ho un solo pc dell'anno 2000 che a momenti non fa il boot neanche da cd-rom 12x.
Che è questo boot usb :sofico:

SwOrDoFmYdEsTiNy
23-02-2009, 21:07
finalmente ho creato il file linux.sec (grazie mille!!!!!) adesso devo solo scoprire come cavolo si fa a installare gparted su chiavetta usb per fargli fare il boot da li!!!

P.s. ma è possibile far fare il boot anche a windows da chiavetta usb? (solo x l'installazione!)

grazie mille kernele!

kernele
23-02-2009, 21:15
Sicuro di aver adeguato menu.lst di grub e reinstallato grub sulla root di linux :rolleyes:


bash-3.2# /sbin/install-grub /dev/sda5
Installing the GRUB bootloader...
Probing devices to guess BIOS drives. This may take a long time.


GNU GRUB version 0.97 (640K lower / 3072K upper memory)

[ Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists the possible
completions of a device/filename. ]
grub> root (hd0,0)
Filesystem type is reiserfs, partition type 0x83
grub> setup (hd0,4)
Checking if "/boot/grub/stage1" exists... yes
Checking if "/boot/grub/stage2" exists... yes
Checking if "/boot/grub/reiserfs_stage1_5" exists... yes
Running "embed /boot/grub/reiserfs_stage1_5 (hd0,4)"... failed (this is not fatal)
Running "embed /boot/grub/reiserfs_stage1_5 (hd0,0)"... failed (this is not fatal)
Running "install /boot/grub/stage1 (hd0,4) /boot/grub/stage2 p /boot/grub/menu.lst "... succeeded
Done.
grub> quit
GRUB was successfully installed.
bash-3.2#
A leggere la pagina di gparted live-cd, pare che ci sia la versione da caricare su penna usb.
Browse old LiveUSB (0.2.5-2 to 0.3.1-1) releases here.
http://gparted.sourceforge.net/download.php
Probabile che come slax (una distro live) basta scompattare l'archiivio dentro la penna usb.


http://sourceforge.net/project/showfiles.php?group_id=115843&package_id=195292

SwOrDoFmYdEsTiNy
23-02-2009, 21:28
io ho scritto questo sul terminale

andrea@Sword-PC:~$ sudo grub-install --root-directory=/home/andrea install_device
[sudo] password for andrea:
Format of install_device not recognized.
Usage: grub-install [OPTION] install_device
Install GRUB on your drive.

-h, --help print this message and exit
-v, --version print the version information and exit
--root-directory=DIR install GRUB images under the directory DIR
instead of the root directory
--grub-shell=FILE use FILE as the grub shell
--no-floppy do not probe any floppy drive
--force-lba force GRUB to use LBA mode even for a buggy
BIOS
--recheck probe a device map even if it already exists

INSTALL_DEVICE can be a GRUB device name or a system device filename.

grub-install copies GRUB images into the DIR/boot directory specfied by
--root-directory, and uses the grub shell to install grub into the boot
sector.

Report bugs to <bug-grub@gnu.org>.

e mi ha creato una cartella chiamata boot con dentro un'altra cartella chiamata grub con dentro un solo file chiamato device.map

kernele
23-02-2009, 21:34
Sbagliato. grub va installato sulla partizione della root di linux.
da una console
sudo fdisk -l
e incolla qui il risultato

Apri
/boot/grub/menu.lts
e incolla qui il risultato

SwOrDoFmYdEsTiNy
23-02-2009, 22:01
sudandrea@Sword-PC:~$ sudo fdisk -l
[sudo] password for andrea:

Disk /dev/sda: 200.0 GB, 200049647616 bytes
255 heads, 63 sectors/track, 24321 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x6572706d

Device Boot Start End Blocks Id System
/dev/sda1 * 1 23564 189277798+ 83 Linux
/dev/sda2 23565 24321 6080602+ 5 Extended
/dev/sda5 23565 24321 6080571 82 Linux swap / Solaris

Disk /dev/sdb: 8029 MB, 8029470208 bytes
255 heads, 63 sectors/track, 976 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk identifier: 0x64f2d284

Device Boot Start End Blocks Id System
/dev/sdb1 1 976 7839698 b W95 FAT32


# menu.lst - See: grub(8), info grub, update-grub(8)
# grub-install(8), grub-floppy(8),
# grub-md5-crypt, /usr/share/doc/grub
# and /usr/share/doc/grub-doc/.

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# the entry number 0 is the default if the command is not used.
#
# You can specify 'saved' instead of a number. In this case, the default entry
# is the entry saved with the command 'savedefault'.
# WARNING: If you are using dmraid do not use 'savedefault' or your
# array will desync and will not let you boot your system.
default 0

## timeout sec
# Set a timeout, in SEC seconds, before automatically booting the default entry
# (normally the first entry defined).
timeout 3

## hiddenmenu
# Hides the menu by default (press ESC to see the menu)
hiddenmenu

# Pretty colours
#color cyan/blue white/blue

## password ['--md5'] passwd
# If used in the first section of a menu file, disable all interactive editing
# control (menu entry editor and command-line) and entries protected by the
# command 'lock'
# e.g. password topsecret
# password --md5 $1$gLhU0/$aW78kHK1QfV3P2b2znUoe/
# password topsecret

#
# examples
#
# title Windows 95/98/NT/2000
# root (hd0,0)
# makeactive
# chainloader +1
#
# title Linux
# root (hd0,1)
# kernel /vmlinuz root=/dev/hda2 ro
#

#
# Put static boot stanzas before and/or after AUTOMAGIC KERNEL LIST

### BEGIN AUTOMAGIC KERNELS LIST
## lines between the AUTOMAGIC KERNELS LIST markers will be modified
## by the debian update-grub script except for the default options below

## DO NOT UNCOMMENT THEM, Just edit them to your needs

## ## Start Default Options ##
## default kernel options
## default kernel options for automagic boot options
## If you want special options for specific kernels use kopt_x_y_z
## where x.y.z is kernel version. Minor versions can be omitted.
## e.g. kopt=root=/dev/hda1 ro
## kopt_2_6_8=root=/dev/hdc1 ro
## kopt_2_6_8_2_686=root=/dev/hdc2 ro
# kopt=root=UUID=4b1541b1-5c0f-4d69-92ca-565037d30a7f ro

## Setup crashdump menu entries
## e.g. crashdump=1
# crashdump=0

## default grub root device
## e.g. groot=(hd0,0)
# groot=(hd0,0)

## should update-grub create alternative automagic boot options
## e.g. alternative=true
## alternative=false
# alternative=true

## should update-grub lock alternative automagic boot options
## e.g. lockalternative=true
## lockalternative=false
# lockalternative=false

## additional options to use with the default boot option, but not with the
## alternatives
## e.g. defoptions=vga=791 resume=/dev/hda5
# defoptions=quiet splash

## should update-grub lock old automagic boot options
## e.g. lockold=false
## lockold=true
# lockold=false

## Xen hypervisor options to use with the default Xen boot option
# xenhopt=

## Xen Linux kernel options to use with the default Xen boot option
# xenkopt=console=tty0

## altoption boot targets option
## multiple altoptions lines are allowed
## e.g. altoptions=(extra menu suffix) extra boot options
## altoptions=(recovery) single
# altoptions=(recovery mode) single

## controls how many kernels should be put into the menu.lst
## only counts the first occurence of a kernel, not the
## alternative kernel options
## e.g. howmany=all
## howmany=7
# howmany=all

## should update-grub create memtest86 boot option
## e.g. memtest86=true
## memtest86=false
# memtest86=true

## should update-grub adjust the value of the default booted system
## can be true or false
# updatedefaultentry=false

## should update-grub add savedefault to the default options
## can be true or false
# savedefault=false

## ## End Default Options ##

title Ubuntu 8.04.2, kernel 2.6.24-23-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=4b1541b1-5c0f-4d69-92ca-565037d30a7f ro quiet splash
initrd /boot/initrd.img-2.6.24-23-generic
quiet

title Ubuntu 8.04.2, kernel 2.6.24-23-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-23-generic root=UUID=4b1541b1-5c0f-4d69-92ca-565037d30a7f ro single
initrd /boot/initrd.img-2.6.24-23-generic

title Ubuntu 8.04.2, kernel 2.6.24-16-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=4b1541b1-5c0f-4d69-92ca-565037d30a7f ro quiet splash
initrd /boot/initrd.img-2.6.24-16-generic
quiet

title Ubuntu 8.04.2, kernel 2.6.24-16-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-16-generic root=UUID=4b1541b1-5c0f-4d69-92ca-565037d30a7f ro single
initrd /boot/initrd.img-2.6.24-16-generic

title Ubuntu 8.04.2, memtest86+
root (hd0,0)
kernel /boot/memtest86+.bin
quiet

### END DEBIAN AUTOMAGIC KERNELS LIST

kernele
23-02-2009, 22:51
Dai:
sudo /sbin/install-grub /dev/sda1
sudo dd if=/dev/sda1 of=/root/linux.sec bs=512 count=1
salva linux.sec su pennino, procedi con il resize di linux e l'installazione di xp.
Come sopra, copi linux.sec in C: e sistemi boot.ini

Fai attenzione, in ubuntu, install-grub potrebbe trovarsi in una posizione diversa dalla mia distro, come:
sudo /usr/sbin/install-grub /dev/sda1

Dopo tutto il casino fatto, spero che questa soluzione vada bene :asd:

vedi anche qui
http://wiki.ubuntu-it.org/AmministrazioneSistema/Grub/Ripristino?highlight=(grub

SwOrDoFmYdEsTiNy
24-02-2009, 13:18
sudo /sbin/install-grub /dev/sda1

ma che comando è questo?? li c'è solo il sudo e nient'altro!!!! mi sa che hai dimenticato qualcosa :p