ببخشید که پست تکراری دادم :-[ :-[ :-[ واقعا شرمندهنه ایرادی نداره :) من منظورم شما نبودید، کلی عرض کردم.
ببخشید که پست تکراری دادم :-[ :-[ :-[ واقعا شرمندهنه ایرادی نداره :) من منظورم شما نبودید، کلی عرض کردم.
باید دنبال روش بگردیم که چجوری میشه یه تازه کار زودتر و بهتر و با روشهای بهینهتر و ریسک کمتر مشکلش حل بشه...
سلام خسته نباشید من یه ویندوز ایکس پی داشتم که کنارش ابونتو نصب کردم و بعد از مدتی یه ویندوز دیگه روش نصب کردم ولی هالا دو تال ویندوز رو دارم ولی ابونتو تو لیست بوت نیست چطور می تونم ابونتو رو هم به لیست اضافه کنم
با تشکر
sudo fdisk -l
خروجی این دستور پارتیشنهای هارددیسک شما هست و نکتش اینه که کنار پارتیشنی که bootable هست یه علامت ستاره * میگذاره. با فرض اینکه پارتیشن / و bootable اوبونتو روی dev/hda3/ باشد، دستورات زیر رو اجرا کنید:sudo mkdir /mnt/root
sudo mount -t ext3 /dev/hda3 /mnt/root
حالا اگر دستور ls /mnt/root را اجرا کنید باید خروجی مانند زیر داشته باشیدbin dev home lib mnt root srv usr
boot etc initrd lib64 opt sbin sys var
cdrom initrd.img media proc selinux tmp vmlinuz
اگر خروجی بالا را ندارید، باید پارتیشن دیگری را mount کنید...grub-install --root-directory=/mnt/root /dev/hda
و بعد سیستم را reboot کنید.
fdisk -l
و جواب میگیرم:Disk /dev/hda: 122.9 GB, 122942324736 bytes
255 heads, 63 sectors/track, 14946 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hda1 * 1 255 2048256 6 FAT16
/dev/hda2 256 14946 118005457+ f W95 Ext'd (LBA)
/dev/hda5 256 2805 20482843+ b W95 FAT32
/dev/hda6 2806 5237 19535008+ 83 Linux
/dev/hda7 5238 14598 75192201 83 Linux
/dev/hda8 14599 14946 2795278+ 82 Linux swap / Solaris
حالا دستور اینکه لینوکسم واقعا روی چه پارتیشنی بوت شده؟vi /etc/fstab
یا با mount نگاه به پارتیشنهای مانت شده می اندازیم برای من در fstab اینها بود:# /etc/fstab: filesystem table.
#
# filesystem mountpoint type options dump pass
/dev/hda7 / ext3 defaults,errors=remount-ro 0 1
proc /proc proc defaults 0 0
/dev/fd0 /floppy vfat defaults,user,noauto,showexec,umask=022,utf8=true 0 0
usbfs /proc/bus/usb usbfs devmode=0666 0 0
sysfs /sys sysfs defaults 0 0
tmpfs /dev/shm tmpfs defaults 0 0
/dev/cdrom /cdrom iso9660 defaults,ro,users,noexec,noauto,utf8=true,umask=000 0 0
/dev/dvd /dvd iso9660 defaults,ro,users,noexec,noauto 0 0
# Added by KNOPPIX
/dev/hda1 /mnt/hda1 vfat noauto,users,exec,umask=000,utf8=true 0 0
# Added by KNOPPIX
/dev/hda5 /mnt/hda5 vfat noauto,users,exec,umask=000,utf8=true 0 0
# Added by KNOPPIX
/dev/hda6 /mnt/hda6 ext3 noauto,users,exec,umask=000,utf8=true 0 0
# Added by KNOPPIX
/dev/hda8 none swap defaults 0 0
/dev/sda1 /mnt/flash vfat noauto,users,exec,umask=000,utf8=true 0 0
خب که این خط آبی شده نمایانگر پارتیشن اصلی است.mount /dev/hda6
ابتدا مانت شود. بعد با دستور :chroot /mnt/hda6
vi /boot/grub/menu.lst
و برای من اینچنین بود: (خطهای اضافی را نیاوردم)title Ubuntu, kernel 2.6.12-9-386
root (hd0,5)
kernel /boot/vmlinuz-2.6.12-9-386 root=/dev/hda6 ro quiet splash
initrd /boot/initrd.img-2.6.12-9-386
savedefault
boot
خب بگذارید آنرا موشکافی کنیم:
root (hd0,5)
یعنی اینکه پارتیشنی که / است در هارد شماره صفر (اولین هارد) و پارتیشن شماره ۵ (ششمین پارتیشن است) این روش برای آدرس دهی در یونیکس است که هاردها از ۰ شروع شده و پارتیشن هر کدام هم از صفر. که معادل hda6 در لینوکس است.kernel /boot/vmlinuz-2.6.12-9-386 root=/dev/hda6 ro quiet splash
کرنل بوت شونده را آدرس دهی میکند. دقت کنید دیگر / شناخته شده و یعنی فایلی که در مسیر /boot/vmlinuz-2.6.12-9-386t و در پارتیشنی که به عنوان / معرفق کردیم وجود دارد.initrd /boot/initrd.img-2.6.12-9-386
kwrite /boot/grub/menu.lst &
kwrite /mnt/hda6/boot/grub/menu.lst &
هر دو منو را باز میکنم.[left]
Device Boot Start End Blocks Id System
/dev/hdc1 * 1 2 16033+ 83 Linux
/dev/hdc2 1231 3524 18426555 f W95 Ext'd (LBA)
/dev/hdc3 3 1230 9863910 83 Linux
/dev/hdc4 3525 7476 31744440 83 Linux
/dev/hdc5 1231 1303 586341 82 Linux swap / Solaris
/dev/hdc6 1304 2886 12715416 83 Linux
/dev/hdc7 2887 3524 5124703+ 83 Linux
Partition table entries are not in disk order
Disk /dev/hdd: 41.1 GB, 41110142976 bytes
255 heads, 63 sectors/track, 4998 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Device Boot Start End Blocks Id System
/dev/hdd1 * 1 1000 8032468+ 7 HPFS/NTFS
/dev/hdd2 1001 4998 32113935 f W95 Ext'd (LBA)
/dev/hdd5 1001 2000 8032468+ 7 HPFS/NTFS
/dev/hdd6 2001 4998 24081403+ b W95 FAT32
[left]
# 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 change this entry to 'saved' or your
# array will desync and will not let you boot your system.
default 0
## timeout sec[/left]
# 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=ab673fa1-ac45-4552-ae54-f8116d6e744d 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
## ## End Default Options ##
title Ubuntu, kernel 2.6.20-15-generic
root (hd0,0)
kernel /vmlinuz-2.6.20-15-generic root=UUID=ab673fa1-ac45-4552-ae54-f8116d6e744d ro quiet splash
initrd /initrd.img-2.6.20-15-generic
quiet
savedefault
title Ubuntu, kernel 2.6.20-15-generic (recovery mode)
root (hd0,0)
kernel /vmlinuz-2.6.20-15-generic root=UUID=ab673fa1-ac45-4552-ae54-f8116d6e744d ro single
initrd /initrd.img-2.6.20-15-generic
title Ubuntu, memtest86+
root (hd0,0)
kernel /memtest86+.bin
quiet
### END DEBIAN AUTOMAGIC KERNELS LIST[/left]
# on /dev/sda1
title Microsoft Windows XP Professional
root (hd0,0)
savedefault
makeactive
chainloader +1
بعد این خطوط رو به فایل menu.lst در مسیر boot/grub/ اضافه کنین (در حالیت روت البته ! )root (hd0,5)
یعنی اینکه پارتیشنی که / است در هارد شماره صفر (اولین هارد) و پارتیشن شماره ۵ (ششمین پارتیشن است) این روش برای آدرس دهی در یونیکس است که هاردها از ۰ شروع شده و پارتیشن هر کدام هم از صفر. که معادل hda6 در لینوکس است.بعد گزینه (hd0,0) رو باید تنظیم کنین