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

Diff of /trunk/src/templates/amd64ArchitectureTemplate.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: amd64ArchitectureTemplate.py,v 1.1 2005/03/21 04:52:48 codeman Exp $ 4$Id: amd64ArchitectureTemplate.py,v 1.2 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 amd64 specific functions. 8This fills in amd64 specific functions.
9""" 9"""
345 h.close() 345 h.close()
346 if not kernel_name[0]: 346 if not kernel_name[0]:
347 raise GLIException("BootloaderError", 'fatal', '_install_grub',"Error: We have no kernel in /boot to put in the grub.conf file!") 347 raise GLIException("BootloaderError", 'fatal', '_install_grub',"Error: We have no kernel in /boot to put in the grub.conf file!")
348 kernel_name = map(string.strip, kernel_name) 348 kernel_name = map(string.strip, kernel_name)
349 initrd_name = map(string.strip, initrd_name) 349 initrd_name = map(string.strip, initrd_name)
350 if self._install_profile.get_kernel_args(): kernel_args = self._install_profile.get_kernel_args()
351 else: kernel_args = ""
350 for i in range(len(kernel_name)): 352 for i in range(len(kernel_name)):
351 grub_kernel_name = kernel_name[i].split(root)[1] 353 grub_kernel_name = kernel_name[i].split(root)[1]
352 for i in range(len(initrd_name)): 354 for i in range(len(initrd_name)):
353 grub_initrd_name = initrd_name[i].split(root)[1] 355 grub_initrd_name = initrd_name[i].split(root)[1]
354 #------------------------------------------------------------- 356 #-------------------------------------------------------------
368 else: 370 else:
369 newgrubconf += "kernel /boot"+ grub_kernel_name[5:] + " root="+root_device+root_minor+"\n" 371 newgrubconf += "kernel /boot"+ grub_kernel_name[5:] + " root="+root_device+root_minor+"\n"
370 else: 372 else:
371 if foundboot: 373 if foundboot:
372 newgrubconf += "kernel " + grub_kernel_name[5:] + " root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=" 374 newgrubconf += "kernel " + grub_kernel_name[5:] + " root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root="
373 newgrubconf += root_device + root_minor + "\n" 375 newgrubconf += root_device + root_minor + " " + kernel_args + "\n"
374 newgrubconf += "initrd " + grub_initrd_name[5:] + "\n" 376 newgrubconf += "initrd " + grub_initrd_name[5:] + "\n"
375 else: 377 else:
376 newgrubconf += "kernel /boot" + grub_kernel_name[5:] + " root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root=" 378 newgrubconf += "kernel /boot" + grub_kernel_name[5:] + " root=/dev/ram0 init=/linuxrc ramdisk=8192 real_root="
377 newgrubconf += root_device + root_minor + "\n" 379 newgrubconf += root_device + root_minor + " " + kernel_args + "\n"
378 newgrubconf += "initrd /boot" + grub_initrd_name[5:] + "\n" 380 newgrubconf += "initrd /boot" + grub_initrd_name[5:] + "\n"
379 381
380 #------------------------------------------------------------- 382 #-------------------------------------------------------------
381 #OK, now that the file is built. Install grub. 383 #OK, now that the file is built. Install grub.
382 #cp /proc/mounts /etc/mtab 384 #cp /proc/mounts /etc/mtab
437 if not kernel_name[0]: 439 if not kernel_name[0]:
438 raise GLIException("BootloaderError", 'fatal', '_install_lilo',"Error: We have no kernel in /boot to put in the grub.conf file!") 440 raise GLIException("BootloaderError", 'fatal', '_install_lilo',"Error: We have no kernel in /boot to put in the grub.conf file!")
439 kernel_name = map(string.strip, kernel_name) 441 kernel_name = map(string.strip, kernel_name)
440 kernel_name[0] = kernel_name[0].split(root)[1] 442 kernel_name[0] = kernel_name[0].split(root)[1]
441 kernel_name[1] = kernel_name[1].split(root)[1] 443 kernel_name[1] = kernel_name[1].split(root)[1]
444 if self._install_profile.get_kernel_args(): kernel_args = self._install_profile.get_kernel_args()
445 else: kernel_args = ""
442 #------------------------------------------------------------- 446 #-------------------------------------------------------------
443 #time to build the lilo.conf 447 #time to build the lilo.conf
444 newliloconf = "" 448 newliloconf = ""
445 if self._install_profile.get_boot_loader_mbr(): 449 if self._install_profile.get_boot_loader_mbr():
446 newliloconf += "boot="+boot_device+" # Install LILO in the MBR \n" 450 newliloconf += "boot="+boot_device+" # Install LILO in the MBR \n"
453 if not self._install_profile.get_kernel_bootsplash(): 457 if not self._install_profile.get_kernel_bootsplash():
454 newliloconf += "#" 458 newliloconf += "#"
455 newliloconf += "vga=788 # Framebuffer setting. Adjust to your own will\n" 459 newliloconf += "vga=788 # Framebuffer setting. Adjust to your own will\n"
456 newliloconf += "image=/boot"+kernel_name[0][5:]+" \n" 460 newliloconf += "image=/boot"+kernel_name[0][5:]+" \n"
457 newliloconf += " label=gentoo \n read-only \n root=/dev/ram0 \n" 461 newliloconf += " label=gentoo \n read-only \n root=/dev/ram0 \n"
458 newliloconf += " append=\"init=/linuxrc ramdisk=8192 real_root="+root_device+root_minor+"\" \n" 462 newliloconf += " append=\"init=/linuxrc ramdisk=8192 real_root="+root_device+root_minor + " " + kernel_args + "\" \n"
459 newliloconf += " initrd=/boot"+kernel_name[1][5:] + "\n\n" 463 newliloconf += " initrd=/boot"+kernel_name[1][5:] + "\n\n"
460 newliloconf = self._lilo_add_windows(newliloconf) 464 newliloconf = self._lilo_add_windows(newliloconf)
461 #now make the lilo.conf file 465 #now make the lilo.conf file
462 file_name = root + "/etc/lilo.conf" 466 file_name = root + "/etc/lilo.conf"
463 try: 467 try:

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

  ViewVC Help
Powered by ViewVC 1.1.20