/[gli]/trunk/src/templates/x86ArchitectureTemplate.py
Gentoo

Diff of /trunk/src/templates/x86ArchitectureTemplate.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 456 Revision 457
1""" 1"""
2Gentoo Linux Installer 2Gentoo Linux Installer
3 3
4$Id: x86ArchitectureTemplate.py,v 1.25 2005/03/26 20:11:49 codeman Exp $ 4$Id: x86ArchitectureTemplate.py,v 1.26 2005/03/30 00:10:50 agaffney Exp $
5Copyright 2004 Gentoo Technologies Inc. 5Copyright 2004 Gentoo Technologies Inc.
6 6
7 7
8This fills in x86 specific functions. 8This fills in x86 specific functions.
9""" 9"""
378 grub_initrd_name = initrd_name[i].split(root)[1] 378 grub_initrd_name = initrd_name[i].split(root)[1]
379 #------------------------------------------------------------- 379 #-------------------------------------------------------------
380 #OK, now that we have all the info, let's build that grub.conf 380 #OK, now that we have all the info, let's build that grub.conf
381 newgrubconf = "" 381 newgrubconf = ""
382 newgrubconf += "default 0\ntimeout 30\n" 382 newgrubconf += "default 0\ntimeout 30\n"
383 if self._install_profile.get_kernel_args(): kernel_args = self._install_profile.get_kernel_args()
384 else: kernel_args = ""
383 if foundboot: #we have a /boot 385 if foundboot: #we have a /boot
384 newgrubconf += "splashimage=(" + grub_boot_drive + "," + grub_boot_minor + ")/grub/splash.xpm.gz\n" 386 newgrubconf += "splashimage=(" + grub_boot_drive + "," + grub_boot_minor + ")/grub/splash.xpm.gz\n"
385 else: #we have / and /boot needs to be included 387 else: #we have / and /boot needs to be included
386 newgrubconf += "splashimage=(" + grub_boot_drive + "," + grub_boot_minor + ")/boot/grub/splash.xpm.gz\n" 388 newgrubconf += "splashimage=(" + grub_boot_drive + "," + grub_boot_minor + ")/boot/grub/splash.xpm.gz\n"
387 389
393 else: 395 else:
394 newgrubconf += "kernel /boot"+ grub_kernel_name[5:] + " root="+root_device+root_minor+"\n" 396 newgrubconf += "kernel /boot"+ grub_kernel_name[5:] + " root="+root_device+root_minor+"\n"
395 else: 397 else:
396 if foundboot: 398 if foundboot:
397 newgrubconf += "kernel " + grub_kernel_name[5:] + " root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=" 399 newgrubconf += "kernel " + grub_kernel_name[5:] + " root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root="
398 newgrubconf += root_device + root_minor + "\n" 400 newgrubconf += root_device + root_minor + " " + kernel_args + "\n"
399 newgrubconf += "initrd " + grub_initrd_name[5:] + "\n" 401 newgrubconf += "initrd " + grub_initrd_name[5:] + "\n"
400 else: 402 else:
401 newgrubconf += "kernel /boot" + grub_kernel_name[5:] + " root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=" 403 newgrubconf += "kernel /boot" + grub_kernel_name[5:] + " root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root="
402 newgrubconf += root_device + root_minor + "\n" 404 newgrubconf += root_device + root_minor + " " + kernel_args + "\n"
403 newgrubconf += "initrd /boot" + grub_initrd_name[5:] + "\n" 405 newgrubconf += "initrd /boot" + grub_initrd_name[5:] + "\n"
404 406
405 #------------------------------------------------------------- 407 #-------------------------------------------------------------
406 #OK, now that the file is built. Install grub. 408 #OK, now that the file is built. Install grub.
407 #cp /proc/mounts /etc/mtab 409 #cp /proc/mounts /etc/mtab
461 if not kernel_name[0]: 463 if not kernel_name[0]:
462 raise GLIException("BootloaderError", 'fatal', '_install_lilo',"Error: We have no kernel in /boot to put in the grub.conf file!") 464 raise GLIException("BootloaderError", 'fatal', '_install_lilo',"Error: We have no kernel in /boot to put in the grub.conf file!")
463 kernel_name = map(string.strip, kernel_name) 465 kernel_name = map(string.strip, kernel_name)
464 kernel_name[0] = kernel_name[0].split(root)[1] 466 kernel_name[0] = kernel_name[0].split(root)[1]
465 kernel_name[1] = kernel_name[1].split(root)[1] 467 kernel_name[1] = kernel_name[1].split(root)[1]
468 if self._install_profile.get_kernel_args(): kernel_args = self._install_profile.get_kernel_args()
469 else: kernel_args = ""
466 #------------------------------------------------------------- 470 #-------------------------------------------------------------
467 #time to build the lilo.conf 471 #time to build the lilo.conf
468 newliloconf = "" 472 newliloconf = ""
469 if self._install_profile.get_boot_loader_mbr(): 473 if self._install_profile.get_boot_loader_mbr():
470 newliloconf += "boot="+boot_device+" # Install LILO in the MBR \n" 474 newliloconf += "boot="+boot_device+" # Install LILO in the MBR \n"
477 if not self._install_profile.get_kernel_bootsplash(): 481 if not self._install_profile.get_kernel_bootsplash():
478 newliloconf += "#" 482 newliloconf += "#"
479 newliloconf += "vga=788 # Framebuffer setting. Adjust to your own will\n" 483 newliloconf += "vga=788 # Framebuffer setting. Adjust to your own will\n"
480 newliloconf += "image=/boot"+kernel_name[0][5:]+" \n" 484 newliloconf += "image=/boot"+kernel_name[0][5:]+" \n"
481 newliloconf += " label=gentoo \n read-only \n root=/dev/ram0 \n" 485 newliloconf += " label=gentoo \n read-only \n root=/dev/ram0 \n"
482 newliloconf += " append=\"init=/linuxrc ramdisk=8192 real_root="+root_device+root_minor+"\" \n" 486 newliloconf += " append=\"init=/linuxrc ramdisk=8192 real_root="+root_device+root_minor + " " + kernel_args + "\" \n"
483 newliloconf += " initrd=/boot"+kernel_name[1][5:] + "\n\n" 487 newliloconf += " initrd=/boot"+kernel_name[1][5:] + "\n\n"
484 newliloconf = self._lilo_add_windows(newliloconf) 488 newliloconf = self._lilo_add_windows(newliloconf)
485 #now make the lilo.conf file 489 #now make the lilo.conf file
486 file_name = root + "/etc/lilo.conf" 490 file_name = root + "/etc/lilo.conf"
487 try: 491 try:

Legend:
Removed from v.456  
changed lines
  Added in v.457

  ViewVC Help
Powered by ViewVC 1.1.20